diff --git a/check.txt b/check.txt new file mode 100644 index 0000000..a5f7952 --- /dev/null +++ b/check.txt @@ -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 diff --git a/check2.txt b/check2.txt new file mode 100644 index 0000000..6a79e51 --- /dev/null +++ b/check2.txt @@ -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 diff --git a/src/main/java/tr/com/srdc/standardtransform/core/XmlTransform.java b/src/main/java/tr/com/srdc/standardtransform/core/XmlTransform.java index c6db61a..c040aa9 100644 --- a/src/main/java/tr/com/srdc/standardtransform/core/XmlTransform.java +++ b/src/main/java/tr/com/srdc/standardtransform/core/XmlTransform.java @@ -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() ) ); diff --git a/src/main/resources/SampleXmlFiles/RealWorld/RM/RMRequestResource_OASIS_Example.xml b/src/main/resources/SampleXmlFiles/RealWorld/RM/RMRequestResource_OASIS_Example.xml index b50a321..6e582ee 100644 --- a/src/main/resources/SampleXmlFiles/RealWorld/RM/RMRequestResource_OASIS_Example.xml +++ b/src/main/resources/SampleXmlFiles/RealWorld/RM/RMRequestResource_OASIS_Example.xml @@ -143,4 +143,22 @@ SampleXmlFiles/XSD/edxl-rm/EDXL-RMRequestResource.xsd" xmlns="urn:oasis:names:tc + + 004 + + + valueURN3 + value3 + + + + + 005 + + + valueURN4 + value4 + + + \ No newline at end of file