[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Fwd: DiffDog 2008 and XSLT 1.0

Subject: RE: Fwd: DiffDog 2008 and XSLT 1.0
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 27 Oct 2008 11:51:16 -0000
RE:  Fwd: DiffDog 2008 and XSLT 1.0
The only obvious difficulties from this sample are

(a) the source documents are given as filenames rather than URIs which means
you may not be able to use document() on them directly

(b) to interpret the path expressions in the xpath attributes, you will need
an extension such as dyn:evaluate(), which is not available in all
processors. Alternatively, another approach is to take this sample output
and generate a stylesheet from it, and then run this generated stylesheet to
produce your desired report.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Luke Stedman [mailto:luke.stedman@xxxxxxxxx] 
> Sent: 27 October 2008 10:33
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  Fwd: DiffDog 2008 and XSLT 1.0
> 
> Thanks for the pointers Michael/Andrew,
> 
> Sample output...
> 
> <diff_result>
> 	<diff_info comparison_mode="text_or_xml">
> 		<source_left name="C:\svn\diff_system\document1.xml"/>
> 		<source_right name="C:\svn\diff_system\document2.xml"/>
> 	</diff_info>
> 	<xml_diff>
> 		<left_location>
> 			<parent xpath="/nodes/node[5]"/>
> 			<position>1</position>
> 		</left_location>
> 		<right_location>
> 			<parent xpath="/nodes/node[5]"/>
> 			<position>1</position>
> 		</right_location>
> 		<left_content>
> 			<attribute name="Something"/>
> 		</left_content>
> 		<right_content>
> 			<attribute name="SomethingElse"/>
> 		</right_content>
> 	</xml_diff>
> ...
> </diff_result>
> 
> I am using XSL 1.0 as we do not currently have an automated 
> process for running XSL 2.0 transformations. :(
> 
> With regards the specific processor used, we will use the 
> Amara/4Suite processor or MSXML.
> 
> What I was trying to do was parse the XML Diff document and 
> retrieve the parent nodes by applying the xpath statement to 
> a document() nodeset.
> 
> Thinking about the problem, which is what I should have done 
> in the first place, it makes more sense to parse the two xml 
> documents and pull in the differences and then apply the 
> xpath... which should work.
> 
> Apologies for wasting your time
> Luke
> 
> 
> 2008/10/27 Michael Kay <mike@xxxxxxxxxxxx>:
> > I suspect only one or two percent of readers of this list know what 
> > DiffDog output looks like. If you want the other 98% to look at the 
> > problem, you would be well advised to show a sample of the output 
> > (i.e. the input to your transformation), and indicate what kind of 
> > report you want from it, and why you think this is 
> difficult to achieve using XSLT.
> >
> > Also your title mentions XSLT 1.0. If you're using Altova 
> DiffDog 2008 
> > then surely you also have access to an XSLT 2.0 processor, 
> so why are 
> > you trying to do it with your hands tied behind your back?
> >
> > Michael Kay
> > http://www.saxonica.com/
> >
> >> -----Original Message-----
> >> From: Luke Stedman [mailto:luke.stedman@xxxxxxxxx]
> >> Sent: 27 October 2008 09:55
> >> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> >> Subject:  Fwd: DiffDog 2008 and XSLT 1.0
> >>
> >> Good Morning/Afternoon/Evening,
> >>
> >> I've been asked to write some reports based on the DiffDog
> >> 2008 XML output.
> >>
> >> The preference is to have this done in XSL, so far no luck 
> - looking 
> >> at it I can't seem to see a solid way of getting the XML processed 
> >> accurately using XSL.
> >>
> >> Has anyone had any joy doing this or should I fall back to 
> doing it 
> >> via Python and an XPath processor?
> >>
> >> Cheers
> >> Luke

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.