Re: [xsl] Create an end element - possible?

Subject: Re: [xsl] Create an end element - possible?
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Sun, 03 Oct 2010 15:17:42 +0200
[x] cross solution wrote:

So now i have to find the "Start" and "End" Tags in the value-of content (the content of <Data> is only an example).
Based on this information i have to create a new element "<w:p>" (this works).
But to create the </w:p> element doesn't work.

There is nothing like a <w:p> element or a </w:p> element in the data XSLT operates on. It operates on a tree of nodes. That tree might be created by parsing markup with start and end tags but when XSLT works on data there are no start tags or end tags, there are only nodes.
And when you create output you also create a tree of nodes, you are not creating tags. So xsl:element creates an element node in a result tree, it does not create start or end tags.


You might want to show us a sample of the input you have and the corresponding output you want to create with XSLT 1.0, then we can try to suggest an XSLT way of achieving that.


--


	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

Current Thread