<?xml version="1.0" encoding="UTF-8"?><rss xmlns:xrl="http://1060.org/xrl" version="2.0"><channel><title>NonMatchingPCDataCombineException</title><link>http://www.deltaxml.com/forum/topic/30</link><description>
					Entries: 8 Views: 143</description><generator>1060 NetKernel Standard Edition v2.x.x 1060 Forum v1.0.0</generator><language>en-us</language><ttl>60</ttl><item><title>Delta files are asymmetric</title><link>http://www.deltaxml.com/forum/topic/30</link><guid isPermaLink="true">http://www.deltaxml.com/forum/topic/30</guid><description>&lt;div&gt;Hi Giovani,&lt;br/&gt;&lt;br/&gt;Thanks for the code, I think I've finally spotted the problem:  A delta file is not symmetric; the combine operation has a &lt;i&gt;direction&lt;/i&gt; which must correspond to the direction (order of input files/streams) in the comparison operation.  &lt;br/&gt;&lt;br/&gt;In summary:&lt;br/&gt;&lt;br/&gt;  a.xml compare b.xml -&amp;gt; ab.xml  (ab.xml is the delta)&lt;br/&gt;  a.xml combine ab.xml -&amp;gt; b.xml&lt;br/&gt;  b.xml reverse-combine ab.xml -&amp;gt; a.xml&lt;br/&gt;&lt;br/&gt;The reverse combination is controlled via a feature setting:&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.deltaxml.com/core/5.0/docs/api/com/deltaxml/api/package-summary.html#features" target="_new"&gt;http://www.deltaxml.com/core/5.0/docs/api/com/deltaxml/api/package-summary.html#features&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I took your code and made it work on my system.  As well as changing the parameters to the combine I also had to:&lt;br/&gt;&lt;br/&gt; * change some of the filepaths to avoid c: (I was using Unix rather than Windows)&lt;br/&gt; * Change one of the StreamResults - for reasons I don't completely understand yet.&lt;br/&gt;&lt;br/&gt;Here is the code and the command-lines used to compile&lt;br/&gt;and run:&lt;br/&gt;&lt;table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="forum-code"&gt;&lt;pre&gt;&lt;br/&gt;import com.deltaxml.api.DeltaXMLProcessingException;&lt;br/&gt;import com.deltaxml.api.XMLCombiner;&lt;br/&gt;import com.deltaxml.api.XMLCombinerConfigurationException;&lt;br/&gt;import com.deltaxml.api.XMLCombinerFactory;&lt;br/&gt;import com.deltaxml.api.XMLCombinerFactoryConfigurationError;&lt;br/&gt;import com.deltaxml.core.ComparatorInstantiationException;&lt;br/&gt;import com.deltaxml.core.IdentityTransformerSetupException;&lt;br/&gt;import com.deltaxml.core.ParserInstantiationException;&lt;br/&gt;import com.deltaxml.core.PipelineProcessingException;&lt;br/&gt;import com.deltaxml.core.PipelinedComparator;&lt;br/&gt;import com.deltaxml.core.PipelinedComparatorException;&lt;br/&gt;import com.deltaxml.core.PropertyNotRecognizedException;&lt;br/&gt;import com.deltaxml.core.TransformerInstantiationException;&lt;br/&gt;import java.io.File;&lt;br/&gt;import java.io.FileWriter;&lt;br/&gt;import java.io.IOException;&lt;br/&gt;import java.io.FileNotFoundException;&lt;br/&gt;import javax.xml.transform.OutputKeys;&lt;br/&gt;import javax.xml.transform.stream.StreamResult;&lt;br/&gt;import javax.xml.transform.stream.StreamSource;&lt;br/&gt;&lt;br/&gt; &lt;br/&gt;public class DeltaXMLTest {&lt;br/&gt;&lt;br/&gt;    static String FILE1 = "a.xml";&lt;br/&gt;    static String FILE2 = "b.xml";&lt;br/&gt;    static String DELTA = "deltaxml.xml";&lt;br/&gt;    static String COMBINED = "combined.xml";&lt;br/&gt;    &lt;br/&gt;    public void generateDelta(){&lt;br/&gt;        &lt;br/&gt;        try {&lt;br/&gt;            PipelinedComparator pc= new PipelinedComparator();&lt;br/&gt;            //pc.setOutputProperty(OutputKeys.INDENT, "yes");&lt;br/&gt;            //pc.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");&lt;br/&gt;            pc.compare(new File(FILE1), &lt;br/&gt;                    new File(FILE2), new File(DELTA));&lt;br/&gt;            &lt;br/&gt;        //} catch (PropertyNotRecognizedException e) {&lt;br/&gt;          //  e.printStackTrace();&lt;br/&gt;        } catch (ParserInstantiationException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (TransformerInstantiationException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (PipelineProcessingException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (IdentityTransformerSetupException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (ComparatorInstantiationException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (IllegalArgumentException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;    &lt;br/&gt;    public void reverseXML(){&lt;br/&gt;        try {&lt;br/&gt;            XMLCombiner combiner = XMLCombinerFactory.newInstance().newXMLCombiner();&lt;br/&gt;            try {&lt;br/&gt;                PipelinedComparator pc= new PipelinedComparator();&lt;br/&gt;                System.out.println(pc.isEqual(new File(FILE2), new File(FILE1)));&lt;br/&gt;            } catch (ParserInstantiationException e) {&lt;br/&gt;                // TODO Auto-generated catch block&lt;br/&gt;                e.printStackTrace();&lt;br/&gt;            } catch (TransformerInstantiationException e) {&lt;br/&gt;                // TODO Auto-generated catch block&lt;br/&gt;                e.printStackTrace();&lt;br/&gt;            } catch (PipelineProcessingException e) {&lt;br/&gt;                // TODO Auto-generated catch block&lt;br/&gt;                e.printStackTrace();&lt;br/&gt;            } catch (ComparatorInstantiationException e) {&lt;br/&gt;                // TODO Auto-generated catch block&lt;br/&gt;                e.printStackTrace();&lt;br/&gt;            }&lt;br/&gt;            &lt;br/&gt;            combiner.combine(new StreamSource(new File(FILE1)), &lt;br/&gt;                             new StreamSource(new File(DELTA)), &lt;br/&gt;                             new StreamResult(new FileWriter(COMBINED)));&lt;br/&gt;            &lt;br/&gt;        } catch (XMLCombinerConfigurationException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (XMLCombinerFactoryConfigurationError e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (DeltaXMLProcessingException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (IOException e) {&lt;br/&gt;          e.printStackTrace();&lt;br/&gt;        }         &lt;br/&gt;    }&lt;br/&gt;    &lt;br/&gt;    public static void main(String[] args) {&lt;br/&gt;        DeltaXMLTest delta = new DeltaXMLTest();&lt;br/&gt;        delta.generateDelta();&lt;br/&gt;        delta.reverseXML();&lt;br/&gt;    }&lt;br/&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br/&gt;&lt;br/&gt;Here are the command-lines I used on my Macbook - on Windows they will be similar but you may need to replace : with ; in  the classpaths.  I copied all of the .jar file from our 5.0 release into this test directory.&lt;br/&gt;&lt;br/&gt;&lt;table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="forum-code"&gt;&lt;pre&gt;/tmp/giovani $ java -version&lt;br/&gt;java version "1.5.0_13"&lt;br/&gt;Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)&lt;br/&gt;Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)&lt;br/&gt;/tmp/giovani $ &lt;br/&gt;/tmp/giovani $ &lt;br/&gt;/tmp/giovani $ &lt;br/&gt;/tmp/giovani $ javac -cp deltaxml.jar DeltaXMLTest.java &lt;br/&gt;/tmp/giovani $ java -cp saxon9.jar:deltaxml.jar:. DeltaXMLTest&lt;br/&gt;false&lt;br/&gt;/tmp/giovani $ ls -l *.xml&lt;br/&gt;-rw-r--r--@ 1 nigelw  wheel   35 Jul  9 12:53 a.xml&lt;br/&gt;-rw-r--r--@ 1 nigelw  wheel   58 Jul  9 12:54 b.xml&lt;br/&gt;-rw-r--r--  1 nigelw  wheel  842 Jul  9 15:08 combined.xml&lt;br/&gt;-rw-r--r--  1 nigelw  wheel  653 Jul  9 15:08 deltaxml.xml&lt;br/&gt;/tmp/giovani $ &lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description><pubDate>Wed, 009 Jul 2008 15:17:00 GMT</pubDate></item><item><title/><link>http://www.deltaxml.com/forum/topic/30</link><guid isPermaLink="true">http://www.deltaxml.com/forum/topic/30</guid><description>&lt;div&gt;Quoting the delta.&lt;br/&gt;Here you go.&lt;br/&gt;&lt;br/&gt;&lt;table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"&gt; &lt;tr&gt;&lt;td&gt;&lt;div class="forum-quote"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&amp;gt;&amp;lt;videocollection xmlns:deltaxml="http://www.deltaxml.com/ns/well-formed-delta-v1" xmlns:dxx="http://www.deltaxml.com/ns/xml-namespaced-attribute" xmlns:dxa="http://www.deltaxml.com/ns/non-namespaced-attribute" deltaxml:deltaV2="A!=B" deltaxml:version="2.0" deltaxml:content-type="changes-only"&amp;gt;&lt;br/&gt;   &amp;lt;title deltaxml:deltaV2="A!=B"&amp;gt;&amp;lt;deltaxml:textGroup deltaxml:deltaV2="A!=B"&amp;gt;&amp;lt;deltaxml:text deltaxml:deltaV2="A"&amp;gt;Tootsie&amp;lt;/deltaxml:text&amp;gt;&amp;lt;deltaxml:text deltaxml:deltaV2="B"&amp;gt;Tootsie 2&amp;lt;/deltaxml:text&amp;gt;&amp;lt;/deltaxml:textGroup&amp;gt;&amp;lt;/title&amp;gt;&lt;br/&gt;&amp;lt;/videocollection&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description><pubDate>Wed, 009 Jul 2008 13:47:00 GMT</pubDate></item><item><title/><link>http://www.deltaxml.com/forum/topic/30</link><guid isPermaLink="true">http://www.deltaxml.com/forum/topic/30</guid><description>&lt;div&gt;Not sure why the delta didn't display here. Trying to post it again (removing now the xml version tag).&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;</description><pubDate>Wed, 009 Jul 2008 13:46:00 GMT</pubDate></item><item><title/><link>http://www.deltaxml.com/forum/topic/30</link><guid isPermaLink="true">http://www.deltaxml.com/forum/topic/30</guid><description>&lt;div&gt;Hello &lt;br/&gt;&lt;br/&gt;thank you for the reply. My delta file has not been modified &lt;br/&gt;by any other process. &lt;br/&gt;Not sure what is wrong. I also would like to say that I followed the same steps in the tutorial, using the same XML files and the same error happens. &lt;br/&gt;&lt;br/&gt;Below is the java code and delta file. I keep receiving the same exception.&lt;br/&gt;I appreciate your help.&lt;br/&gt;&lt;br/&gt;Java Code:&lt;br/&gt;&lt;br/&gt;&lt;table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="forum-code"&gt;&lt;pre&gt;public class DeltaXMLTest {&lt;br/&gt;&lt;br/&gt;    static String FILE1 = "C:/Java/XML/a.xml";&lt;br/&gt;    static String FILE2 = "C:/Java/XML/b.xml";&lt;br/&gt;    static String DELTA = "C:/Java/XML/deltaxml.xml";&lt;br/&gt;    static String COMBINED = "C:/Java/XML/combined.xml";&lt;br/&gt;    &lt;br/&gt;    public void generateDelta(){&lt;br/&gt;        &lt;br/&gt;        try {&lt;br/&gt;            PipelinedComparator pc= new PipelinedComparator();&lt;br/&gt;            //pc.setOutputProperty(OutputKeys.INDENT, "yes");&lt;br/&gt;            //pc.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");&lt;br/&gt;            pc.compare(new File(FILE1), &lt;br/&gt;                    new File(FILE2), new File(DELTA));&lt;br/&gt;            &lt;br/&gt;        //} catch (PropertyNotRecognizedException e) {&lt;br/&gt;          //  e.printStackTrace();&lt;br/&gt;        } catch (ParserInstantiationException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (TransformerInstantiationException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (PipelineProcessingException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (IdentityTransformerSetupException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (ComparatorInstantiationException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (IllegalArgumentException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;    &lt;br/&gt;    public void reverseXML(){&lt;br/&gt;        try {&lt;br/&gt;            XMLCombiner combiner = XMLCombinerFactory.newInstance().newXMLCombiner();&lt;br/&gt;            try {&lt;br/&gt;                PipelinedComparator pc= new PipelinedComparator();&lt;br/&gt;                System.out.println(pc.isEqual(new File(FILE2), new File(FILE1)));&lt;br/&gt;            } catch (ParserInstantiationException e) {&lt;br/&gt;                // TODO Auto-generated catch block&lt;br/&gt;                e.printStackTrace();&lt;br/&gt;            } catch (TransformerInstantiationException e) {&lt;br/&gt;                // TODO Auto-generated catch block&lt;br/&gt;                e.printStackTrace();&lt;br/&gt;            } catch (PipelineProcessingException e) {&lt;br/&gt;                // TODO Auto-generated catch block&lt;br/&gt;                e.printStackTrace();&lt;br/&gt;            } catch (ComparatorInstantiationException e) {&lt;br/&gt;                // TODO Auto-generated catch block&lt;br/&gt;                e.printStackTrace();&lt;br/&gt;            }&lt;br/&gt;            &lt;br/&gt;            combiner.combine(new StreamSource(new File(FILE2)), &lt;br/&gt;                             new StreamSource(new File(DELTA)), &lt;br/&gt;                             new StreamResult(new File(COMBINED)));&lt;br/&gt;            &lt;br/&gt;        } catch (XMLCombinerConfigurationException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (XMLCombinerFactoryConfigurationError e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        } catch (DeltaXMLProcessingException e) {&lt;br/&gt;            e.printStackTrace();&lt;br/&gt;        }         &lt;br/&gt;    }&lt;br/&gt;    &lt;br/&gt;    public static void main(String[] args) {&lt;br/&gt;        DeltaXMLTest delta = new DeltaXMLTest();&lt;br/&gt;        delta.generateDelta();&lt;br/&gt;        delta.reverseXML();&lt;br/&gt;    }&lt;br/&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br/&gt;&lt;br/&gt;Delta File&lt;br/&gt;&lt;/div&gt;</description><pubDate>Wed, 009 Jul 2008 13:44:00 GMT</pubDate></item><item><title>Recombined Deltas must be 'raw'</title><link>http://www.deltaxml.com/forum/topic/30</link><guid isPermaLink="true">http://www.deltaxml.com/forum/topic/30</guid><description>&lt;div&gt;Hello Giovani,&lt;br/&gt;&lt;br/&gt;Without seeing the delta input to the recombine operation it is hard to give a definitive answer to this problem.  However,   I can make an educated guess:  there is a good chance that your delta input to the combine operation has been modified in some way.&lt;br/&gt;&lt;br/&gt;The recombine operation requires 'raw' delta files, and in particular you &lt;b&gt;should not&lt;/b&gt;:&lt;br/&gt; * Indent the output delta ("Indent=yes" on the command-line)&lt;br/&gt; * Remove whitespace with the NormalizeSpace filter prior to comparison&lt;br/&gt;   (add "Preserve Whitespace=true" to the command-line tools).&lt;br/&gt;&lt;br/&gt;We added these options to various comparison pipelines because they provide flexibility for users doing various types of comparison operation and post-processing, however they do not play well with the recombination operations.&lt;br/&gt;&lt;br/&gt;If you are familar with the UNIX command-line tools diff and patch, this would be similar to reformatting a diff output file and then expecting patch to operate on it.&lt;br/&gt;&lt;br/&gt;We document this, for the command-line tools in the release and online at:&lt;br/&gt;  &lt;a href="http://www.deltaxml.com/core/5.0/docs/command-processor.html#commands" target="_new"&gt;http://www.deltaxml.com/core/5.0/docs/command-processor.html#commands&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;From the exception stack-trace I see that you are using the API.  You may have noticed that there isn't a PipelinedCombiner as pipelining the combine operation doesn't make sense (there are no useful input or output filters that can be applied).  In general if you are using the &lt;b&gt;com.deltaxml.api.XMLCombiner&lt;/b&gt; it makes sense to  also use the comparator from the same package, the &lt;b&gt;com.deltaxml.api.XMLComparator&lt;/b&gt;.&lt;br/&gt;&lt;br/&gt;I think we need to make our documentation clearer on these aspects of the Combiner API usage (similar to the command-line documentation) and we will do this&lt;br/&gt;for our 5.1 release.&lt;br/&gt;&lt;br/&gt;Thanks for the feedback and apologies for any confusion this has caused.&lt;br/&gt;&lt;br/&gt;Nigel&lt;/div&gt;</description><pubDate>Wed, 009 Jul 2008 12:11:00 GMT</pubDate></item><item><title>NonMatchingPCDataCombineException</title><link>http://www.deltaxml.com/forum/topic/30</link><guid isPermaLink="true">http://www.deltaxml.com/forum/topic/30</guid><description>&lt;div&gt;Hi&lt;br/&gt;I was able to create a delta file without problems but when trying to recombine the delta with one of the original files to get a third one I receive the following exception:&lt;br/&gt;&lt;br/&gt;&lt;table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="forum-code"&gt;&lt;pre&gt;com.deltaxml.api.NonMatchingPCDataCombineException: The PCData at /videocollection in the delta file does not match the PCData at /videocollection in the input file.&lt;br/&gt;   at com.deltaxml.c_b.c_cb.c_b(c_cb.java:240)&lt;br/&gt;   at com.deltaxml.api.CombinerImpl.combine(CombinerImpl.java:8)&lt;br/&gt;   at deltaxml.DeltaXMLTest.reverseXML(DeltaXMLTest.java:77)&lt;br/&gt;   at deltaxml.DeltaXMLTest.main(DeltaXMLTest.java:93)&lt;br/&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br/&gt;Here are the XML files&lt;br/&gt;&lt;br/&gt;a.xml&lt;br/&gt;&lt;table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="forum-xml"&gt;&lt;div class="xmlverb-default codeblock"&gt;&amp;lt;&lt;span class="xmlverb-element-name"&gt;videocollection&lt;/span&gt;&amp;gt;&lt;br/&gt;  &amp;lt;&lt;span class="xmlverb-element-name"&gt;title&lt;/span&gt;&amp;gt;&lt;span class="xmlverb-text"&gt;Tootsie&lt;/span&gt;&amp;lt;/&lt;span class="xmlverb-element-name"&gt;title&lt;/span&gt;&amp;gt;&lt;br/&gt;&amp;lt;/&lt;span class="xmlverb-element-name"&gt;videocollection&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br/&gt;&lt;br/&gt;b.xml&lt;br/&gt;&lt;table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"&gt;&lt;tr&gt;&lt;td&gt;&lt;div class="forum-xml"&gt;&lt;div class="xmlverb-default codeblock"&gt;&amp;lt;&lt;span class="xmlverb-element-name"&gt;videocollection&lt;/span&gt;&amp;gt;&lt;br/&gt;  &amp;lt;&lt;span class="xmlverb-element-name"&gt;title&lt;/span&gt;&amp;gt;&lt;span class="xmlverb-text"&gt;Tootsie 2&lt;/span&gt;&amp;lt;/&lt;span class="xmlverb-element-name"&gt;title&lt;/span&gt;&amp;gt;&lt;br/&gt;&amp;lt;/&lt;span class="xmlverb-element-name"&gt;videocollection&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br/&gt;&lt;br/&gt;Any idea?&lt;/div&gt;</description><pubDate>Tue, 008 Jul 2008 20:00:00 GMT</pubDate></item></channel></rss>