|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: detecting if a given node contains other nodes fro
I'm not sure where the "only" belongs in your sentence. If the element has
no descendants, does it pass or fail?
Let's suppose you mean "test whether every descendant of the current element
is either a text node or an element in a different namespace".
Invert the condition: it's false if the element contains another element in
the same namespace, or a comment, or a processing instruction.
test="not(.//*[namespace-uri()=namespace-uri(current())]
or .//comment()
or .//processing-instruction())"
Michael Kay
> -----Original Message-----
> From: SANWAL, ABHISHEK (HP-Houston) [mailto:abhishek.sanwal@xxxxxx]
> Sent: 08 September 2004 20:40
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: detecting if a given node contains other nodes
> from a different namespace or plain text only?
>
> Detecting if a given node contains other nodes from a different
> namespace or plain text only?
>
> How can I do that?
>
> I believe it could be done using the text() and node() functions...
>
> Suggestions?
>
> Thanks in advance.
>
> Abhishek
|
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








