xsl-list
[Top] [All Lists]

Re: aborting element creation

2005-02-11 04:26:58
dump the @


On Thu, 10 Feb 2005 17:43:23 +0100, Joris Gillis <roac(_at_)pandora(_dot_)be> 
wrote:
Hi XSL guru's and experts,

I was wondering...
Is there a way (in XSLT1.0 or 2.0) to prohibit an element to be
constructed and added to the result tree, while other XSL instruction
inside are being processed normally?

In other words, how can I transform this XML:
<root>
        <node encapsulate="container"/>
        <node/>
</root>

into this:

<root>
        <container>
                <node encapsulate="container"/>
        </container>
        <node/>
</root>

without any decisive structure or pattern matching?

the following template throws an error about the Qname (XSLT1.0):

<xsl:template match="node">
        <xsl:element name="{(_at_)encapsulate}">
                <xsl:copy-of select="."/>
        </xsl:element>
</xsl:template>

Thanks in advance
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
Vincit omnia simplicitas
Keep it simple

--~------------------------------------------------------------------
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>
--~--




-- 
<M:D/>

:: M. David Peterson ::
XML & XML Transformations, C#, .NET, and Functional Languages Specialist

--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>