Subject: Re: [xsl] grouping problem From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 28 Nov 2007 17:54:54 -0500 |
I do have a more general question/clarification that perhaps someone can address.
Say I want to replace an element and its attributes with a new element name and attribute(s). Say I also want to keep the mark-up of the content. I have noticed that if I use <xsl:value-of select "."/> the content mark-up is stripped out. So with this content:
<test> <selection name="u1pt01"> <para> text, more text, <i>italic text.</i> </para> </selection>
</test>
The following template would strip out the <i> tags,
<xsl:template match="selection"> <para aim:pstyle='bodytext'><xsl:value-of select "para"/><para> </xsl:template>
producing
<test> <selection name="u1pt01"> <para aim:pstyle='bodytext'> text, more text, italic text. </para> </selection>
</test>
Am I correct?
To avoid stripping content mark-up, I need to use <xsl:copy-of select "para"/>. When I do that, however, I get two <para> tags.
With copy-of, is it still possible to replace elements and attributes?
I suspect that I am missing something very basic. Some clarification would be great.
-- Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] grouping problem, Terry Ofner | Thread | [xsl] How to read Schema XSD in sty, wiky |
Re: [xsl] recursive sorting by elem, Davis Ford | Date | RE: [xsl] Calling XML using Javascr, Nistala, Anu |
Month |