Skip to content

Commit

Permalink
Stable version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arda Güney committed Aug 31, 2016
1 parent 657b881 commit 45b8468
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 1 deletion.
33 changes: 33 additions & 0 deletions check.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
33 changes: 33 additions & 0 deletions check2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
ok
description1 yok
ok
ok
ok
ok
ok
ok
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,21 @@ public String transformDocument( Document sourceDocumentParam, Document template
replaceNodes( sourceNodeList.subList( 0, 1 ), targetNodeList.subList( 0, 1 ) );

if ( sourceNodeList.size() > 1 ) {
//TODO: This check is NOT VALID and should be changed. Target nodes may have changed previously, if this is the case, previously written values may overwritten.
if ( sourceNodeList.size() > nonmappedNodesCount ) {
createBoundedNodes( sourceNodeList.subList( 1, sourceNodeList.size() ), targetNodeList.get( 0 ) );

/* targetNodeList = XmlUtil.asList( (NodeList) xPath.compile( mapping[ 2 ] ).evaluate( templateDocumentParam, XPathConstants.NODESET ) );
Node kayikNode = targetNodeList.get( targetNodeList.size() - 1 );
Node babaKayikNode = findUnboundedAncestorNode( kayikNode );
Node babaRefNode = findUnboundedAncestorNode( targetNodeList.get( 0 ) );
if ( babaKayikNode == null ) {
continue;
}
babaRefNode.getParentNode().insertBefore( babaKayikNode, babaRefNode );
*/
}
else {
replaceNodes( sourceNodeList.subList( 1, sourceNodeList.size() ), targetNodeList.subList( 1, targetNodeList.size() ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,22 @@ SampleXmlFiles/XSD/edxl-rm/EDXL-RMRequestResource.xsd" xmlns="urn:oasis:names:tc
</Location>
</ScheduleInformation>
</ResourceInformation>
<ResourceInformation>
<ResourceInfoElementID>004</ResourceInfoElementID>
<Resource>
<TypeStructure>
<rm:ValueListURN>valueURN3</rm:ValueListURN>
<rm:Value>value3</rm:Value>
</TypeStructure>
</Resource>
</ResourceInformation>
<ResourceInformation>
<ResourceInfoElementID>005</ResourceInfoElementID>
<Resource>
<TypeStructure>
<rm:ValueListURN>valueURN4</rm:ValueListURN>
<rm:Value>value4</rm:Value>
</TypeStructure>
</Resource>
</ResourceInformation>
</RequestResource>

0 comments on commit 45b8468

Please sign in to comment.