Re: [xsl] Create XML from XPath expressions

Subject: Re: [xsl] Create XML from XPath expressions
From: Michael Müller-Hillebrand <mmh@xxxxxxxxxxxxx>
Date: Tue, 18 Aug 2009 12:58:51 +0200

There are many open questions.

E.g. the desired <item> element: Is it supposed to be created from the
<Path> information?

Or: How can I know that <Path>/item/street/@type</Path> is an
attribute of the immediately preceding <Path>/item/street</Path> and
not of some earlier <item>?

You could first process each <Difference> element by parsing the
<Path> to create elements and attributes, like

<item><street>2020 Washington Ave.</street></item>
<item><street type="business"/></item>
<item><city>Los Angeles</city></item>

As far as I can see, this is the only data that is specified by the
source document. Combining this into a single <item> is an assumption
and could be handled according to the assumed logic in a second step.

- Michael M|ller-Hillebrand

PS: Which software creates such a diff report?

Am 18.08.2009 um 10:19 schrieb Heiko Niemann:


I've an xml diff result that looks similar to this:


<NewValue>2020 Washington Ave.</NewValue>



<NewValue>Los Angeles</NewValue>


Now I want to build a new xml based on the XPath expressions in each Path element just using XSLT. So the result should look like this:


 <street type="business">2020 Washington Ave.</street>
 <city>Los Angeles</city>


I have different processors and extensions available and I have tried several approaches. Also available are the xml files I compared to get the diff result.

Thank you for your help and ideas.


-- _______________________________________________________________ Michael M|ller-Hillebrand: Dokumentations-Technologie Adobe Certified Expert, FrameMaker Lvsungen und Training, FrameScript, XML/XSL, Unicode Blog: - Tel. +49 (9131) 28747

Current Thread