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: Mon, 27 Oct 2008 11:32:47 +0100
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