Subject: Re: [xsl] Create XML from XPath expressions From: "Heiko Niemann" <kontakt@xxxxxxxxxxxxxxxx> Date: Tue, 18 Aug 2009 15:12:51 +0200 |
> Hello, > > There are many open questions. > > E.g. the desired <item> element: Is it supposed to be created from the > <Path> information? > Yes. > 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>? > There will be indices if there are several siblings with the same name. In this case there was just one item element. > 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><zip>90210</zip></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. > What would the second step look like? I guess parsing will cause some pain when there are indices. :( Anyhow, I was looking for a way (an easy way) to transform the Path data into a document structure, since I need the whole branch and not just a single element, which I would get if I applied the (evaluated) XPath on the original document (e.g. copy-of). At least I have not found a way yet to say: find this node/nodeset using this xpath expression and then return the whole branch which leads to that node/nodeset. > - Michael M|ller-Hillebrand > > PS: Which software creates such a diff report? > It's a component of a BPM software. Heiko
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Create XML from XPath exp, Michael Müller-Hille | Thread | Re: [xsl] Create XML from XPath exp, Michael Müller-Hille |
Re: [xsl] Create XML from XPath exp, Michael Müller-Hille | Date | Re: [xsl] Create XML from XPath exp, Heiko Niemann |
Month |