Subject: Re: [xsl] Dealing with <![CDATA[]]> when it can't be avoided From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 5 Jul 2007 21:57:37 +0100 |
> <sql><![CDATA[SELECT * FROM users WHERE clue > 0]]></sql> > As you can see, it's necessary to enclose the SQL in <![CDATA[]]> because some of the characters I must use would not be legal XML. well, actually we can't see in that example (which would be legal without the CDATA markup) but could imagine the use of < > <sql><![CDATA[SELECT * FROM users WHERE status IN (]]><list>'alive,'awake','sentient'</list>><![CDATA[)]]></sql> > > but there isn't any XSLT construct to permit me to select all the content of an element EXCEPT the content of the child <list>. Or at least I can't think of one. select="node()[not(self::list)]" or in xslt2 select="node() except list()" , or if you know list is the only possible element, select="text()" David ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Dealing with <![CDATA[]]> whe, cknell | Thread | RE: [xsl] Dealing with <![CDATA[]]>, Michael Kay |
Re: [xsl] Removing an XML Attribute, Wendell Piez | Date | [xsl] help in xslt2 grouping, alex v. |
Month |