It seems a modified identity transform will work.
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:template>
<xsl:template match="Para">
<p><xsl:apply-templates /></p>
</xsl:template>
On 10/9/06, Jan Limpens <jan(_at_)limpens(_dot_)com> wrote:
Hi,
I need help creating an encoded html string from some nodes of a
document, while leaving the others untouched
I have got a xml file as such:
<?xml version="1.0" encoding="utf-8"?>
<Entry pubdate="2006-10-08T20:25:36.65625-03:00" id="test"
xmlns="http://com/entry">
<navi:show-in-list>true</navi:show-in-list>
<navi:order>99</navi:order>
<Thumbnail src="xxx.gif" />
<Version xml:lang="en">
<Title>enTitle</Title>
<NavigationTitle>enNavTitle</NavigationTitle>
<Body>
<Para>Hello Dolly!</Para>
</Body>
</Version>
<Version xml:lang="de">
<Title>2deTitle</Title>
<NavigationTitle>2deNavTitle</NavigationTitle>
<Body>
<Para>Hallo Doris!</Para>
</Body>
</Version>
<Slideshow>
<Image src="sss.gif">
<ImageInfo xml:lang="en">
<Title>Title</Title>
<Description>Description</Description>
</ImageInfo>
</Image>
<Image src="2222.gif">
<ImageInfo xml:lang="en">
<Title>Title</Title>
</ImageInfo>
</Image>
</Slideshow>
</Entry>
and transform it to
<?xml version="1.0" encoding="utf-8"?>
<Entry xmlns:navi="http//limpens.com/navigation"
pubdate="2006-10-08T20:25:36.65625-03:00" id="test"
xmlns="http://limpens.com/entry">
<navi:show-in-list>true</navi:show-in-list>
<navi:order>99</navi:order>
<Thumbnail src="xxx.gif" />
<Version xml:lang="en">
<Title>enTitle</Title>
<NavigationTitle>enNavTitle</NavigationTitle>
<Body><p>Hello Dolly!</p></Body>
</Version>
<Version xml:lang="de">
<Title>2deTitle</Title>
<NavigationTitle>2deNavTitle</NavigationTitle>
<Body><p>Hallo Doris!</p></Body>
</Version>
<Slideshow>
<Image src="sss.gif">
<ImageInfo xml:lang="en">
<Title>Title</Title>
<Description>Description</Description>
</ImageInfo>
</Image>
<Image src="2222.gif">
<ImageInfo xml:lang="en">
<Title>Title</Title>
</ImageInfo>
</Image>
</Slideshow>
</Entry>
How can I do this? I am using the .net 2.0 xslt implementation. Big
thanks in advance,
--
Jan
www.limpens.com
--
Regards,
Mukul Gandhi
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--