Subject: Re: [xsl] aborting element creation From: "Joris Gillis" <roac@xxxxxxxxxx> Date: Thu, 10 Feb 2005 18:24:39 +0100 |
I've no idea what you mean by "with no decisive structure or patternThis is what I mean with "pattern matching". (Sorry, I'm quite bad at using correct terminology)
matching", or why you want to constrain the solution, but the obvious way to
solve your problem is by have two template rules one with match="node" and one with match="node[@encapsulate]".
Your template, when it processes a node with no @encapsulate attribute, is generating an element whose name is "", which will obviously fail.Indeed, but why can't the 'xsl:element' not just do nothing instead of raising an error when the name is empty?
<xsl:template match="/"> <root> <xsl:element name=""> <node/> </xsl:element> </root> </xsl:template>
<xsl:template match="/"> <root> <node/> </root> </xsl:template>
regards, -- Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041) Vincit omnia simplicitas Keep it simple
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] aborting element creation, Michael Kay | Thread | RE: [xsl] aborting element creation, Michael Kay |
RE: [xsl] tokenize() for text wrap, Richard Lewis | Date | RE: [xsl] using javascript in xslt, Michael Kay |
Month |