DeltaXML Support Forums
| Not found what you where looking for? Try the advanced search | Go to page back123...345...131415next |
| DeltaXML Core > Cannot successfully ignore changes | |||||||
Posted:
09-September-2008 19:08 Re: Cannot successfully ignore changes Hi Ann,
Looking at the code you've quoted in your forum post, it looks like you've found our samples/IgnoreChanges directory in the 5.1 release. Did you try out the sample on the command-line as described in the ReadMe file in that directory, and did it work? We've certainly double checked that here and found it so.
That XSL has 2 templates, the first is what is normally called the XSLT 'identity transform' or template. It copies the input to the output. Its recursive in nature - it copies an element at one level and then recurses to process its attributes and child nodes (element, text etc.). The other template has a more specific, and therefore higher priority match statement:
It will match any deltaxml:attributes element with an immediate dxa:lastUpated child at any level of the tree. Its possbile to write a more specific XPath, that would match more specific lastUpdated attributes if that is what you need. The second template also copies the element and recurses, but in addition it creates an attribute. This is the deltaxml:ignore-changes, its value should be the string true. In the original template this is carefully quoted, it's:
Your output example should look more like this:
I'm unsure as to what is causing the attribute value to be an empty string rather than the string true. One possibility is that you are not using Saxon 9 as your XSLT processor. Is it on your Java classpath? There are some other aspects of your post which I'll pick up on. These may not be the cause of the problem, but may help us to get to a solution:
Do you really mean that you've added the contents you quoted? If so, I can foresee problems. That was a complete XSLT filter, you can't really add that to another XSLT filter. And finally, if that was the output of your pipeline then you are probably missing the two filters which process that XML and do the actual ignoring of the changes. These are apply-ignore-changes.xsl and propogate-ignore-changes.xsl. The DXP pipeline in the sample directory allows this to be easily used and tested from the command-line. If you are needing to run this from existing Java code, you can either: - build the equivalent pipeline using the PipelinedCompator class and its setOutputFilters methods, or - use DXPConfiguration to build you a PipelinedComparator from an existing DXP file, such as the one on the samples directory or a simplified one. I hope this helps in some way to get this working. The code you quoted should work, so its probably a configuration issue. Please get back to us if this doesn't help and you are still stuck. Thanks, Nigel | |||||||
| DeltaXML Core > WordByWordInfilter | |||||||
Posted:
09-September-2008 18:15 Re: WordByWordInfilter Hello Ann, It looks like we've hit a problem with our website updates. The document you are referring to:
was supposed to be retired for our 5.0 release (as well as changing the delta format we made some major revisions to the provided and sample filters). The document you found was superseded by this one: http://www.deltaxml.com/library/filters-and-pipelines.html It looks like what went wrong was that we updated our technical docs index page at: http://www.deltaxml.com/library/index.html, but the site menu wasn't or was incorrectly updated. I've reported the problem and hopefully it will be fixed tomorrow. As to why that document was superseded/replaced: 1: we've found writing SAX filters in Java is hard work and difficult to explain beyond very simple cases 2: XSLT processors such as Saxon have been getting faster over the years since we introduced our pipeline/filter architecture 3: therefore we've decided to use Java filters only where we find there is a big performance advantage 4: we'll continue to support the Java filters we've writen for performance reasons, and any that customers have written, but we'd rather encourage/point our users towards using XSLT for new filters.
This was replaced in 5.0 by WordInfilter.class The new documentation linked above has some nice examples of what it does. Apologies for the confusion, and thanks for reporting it, we'll ensure the old documentation is removed properly and the site is consistent. Thanks, Nigel | |||||||
| DeltaXML Core > Cannot successfully ignore changes | |||||||
Posted:
09-September-2008 11:09 Cannot successfully ignore changes Hi, Using my evaluation version of DeltaXMLCore_5.1 I am trying to ignore an attribute that existing in my two XML files that I am comparing. I have added the following to an XSL file which is being used as an output filter from my Java class that is using the com.deltaxml.core API.
but I am still seeing the following in my output file
My lastUpdated attribute is embedded 3 deep in my XML files. Does this change the way that I should be referring to it in my XSL? Any advice greatly appreciated, Thanks, Ann | |||||||
| DeltaXML Core > WordByWordInfilter | |||||||
Posted:
09-September-2008 10:38 WordByWordInfilter Hi, I am trying to use PCXMLFilterTest3.java class from the 'Guide to writing Java XML Filters for DeltaXML' guide. Can someone tell me where I can locate the WordByWordInfilter class? It doesn't seem to come as part of the DeltaXMLCore 5.1 API. Thanks in advance, Ann | |||||||
| DeltaXML Core > Stop comparing after the first difference | |||||||
Posted:
09-September-2008 23:53 isEqual method in earlier versions Thanks for the quick response. isEqual method on PipelineComparator seems to be introduced from version 5.x only. Is there an equivalent or a workaround available for the previous versions (4) ? | |||||||
| DeltaXML Core > What is the main purpose of DeltaXML Core | |||||||
Posted:
09-September-2008 17:00 Re: What is the main purpose of DeltaXML Core Hello Ann, DeltaXML Core can generally do both of the things you describe. Our expertise is in both highlighting/describing change, but also various forms of processing change:
This kind of change processing is possible and indeed we implement it in some of our pre-defined pipelines or 'configurations' for different languages or formats. If you look at our xhtml processing we do this type of proiritizing when dealing with things which are difficult to display - such as XHTML links. With our 5.1 we have also introduced a new user-customizable prioritization mechanism, see: http://www.deltaxml.com/dxml/library/ignore-changes.html
We can do change display, and have a solution for well-formed XML. For example see our sandbox: http://www.deltaxml.com/free/sandbox/ More specialized forms of difference displays can also be developed. We have 'out of the box' solutions for xhtml and docbook. Other formats are easy to develop with some Java/XSLT skills. What we do not have is a GUI tool to accept/reject changes interactively. We concentrate on server-centric and/or automated XML processing. However it would be possible to build such a tool using our differencing engine as its basis. Hope this helps, Nigel[/b] | |||||||
| DeltaXML Core > What is the main purpose of DeltaXML Core | |||||||
Posted:
09-September-2008 11:16 What is the main purpose of DeltaXML Core Hi, Can you tell me if my understanding of the main use of DeltaXML Core is correct as I am unsure if it is a suitable product for our companies needs? - DeltaXML Core will compare 2 XML files (file1 and file2) and will produce a report where the differences in file2 have priority over file1 and so are merged over file1 in the resulting report. If I want to view the differences between 2 files and have the option of which difference I should take on then DeltaXML is not the product for me. Thanks in advance, Ann Flavin | |||||||
| DeltaXML Core > Stop comparing after the first difference | |||||||
Posted:
09-September-2008 009:08 Re: Stop comparing after the first difference Hi, thanks for the question.
Yes, both com.deltaxml.core.PipelinedComparator and com.deltaxml.api.XMLComparator feature an isEqual() method which provides a fast-fail comparison i.e. it will return false as soon as the first difference is found. However, this will only return a boolean representing input equality; it will not tell you what the difference is. A full comparison using on of the compare() methods must be used to achieve this. Many thanks, Tristan | |||||||
| DeltaXML Core > Error in DeltaV2 Introduction Document | |||||||
Posted:
09-September-2008 009:01 Re: Error in DeltaV2 Introduction Document Thanks very much for pointing this out and well spotted! The error has now been corrected. Tristan | |||||||
| DeltaXML Core > Stop comparing after the first difference | |||||||
Posted:
09-September-2008 008:32 Stop comparing after the first difference Is there a way to instruct Delta XML Pipeline comparator to stop the comparison when it finds the first difference? I want to compare two documents with orderless, key-based comparison and know whether there is atleast one difference. | |||||||