[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Fwd: DiffDog 2008 and XSLT 1.0
Subject: Re: [xsl] Fwd: DiffDog 2008 and XSLT 1.0 From: "Luke Stedman" <luke.stedman@xxxxxxxxx> Date: Tue, 28 Oct 2008 14:03:46 +0000 |
Thanks for the advice Michael, You are spot on, I am running into issues with regards the documents - I can get round this without much issue, and will need to use the dyn:evaluate function, thus restricting me to 4xslt. Using the dyn:evluate function works perfectly. Thanks again Luke 2008/10/27 Michael Kay <mike@xxxxxxxxxxxx>: > 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: [xsl] 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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Fwd: DiffDog 2008 and XSL, Michael Kay | Thread | RE: [xsl] Fwd: DiffDog 2008 and XSL, Margaret Gruen-Kerr |
Re: [xsl] running a 'pipeline' as a, Dimitre Novatchev | Date | Re: [xsl] XQuery Updates in XSLT, Dimitre Novatchev |
Month |