|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: storing the result of a transformation in a param
> String-length only works if $content is a text node, on a result tree > fragment, it returns false every time. > > I need something that evaluates to true when a result tree fragment is > present in the variable. > The variable will always contain a result tree fragment: you are trying to test, I think, whether the fragment (which is a document node) has any child nodes. Since there are only two things you can do with an RTF in XSLT 1.0, convert it to a string or copy it to another tree, there is no way of distinguishing an RTF having a single empty element child from one that has no children. (Both have a string value of "" - it's not true that string-length works only on text nodes, but it is true that it gives you zero if there are no text nodes, regardless of how many element nodes there are.) So: you can't do it without the xx:node-set extension. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








