RE: [xsl] cdata?

Subject: RE: [xsl] cdata?
From: "Oleg Tkachenko" <olegt@xxxxxxxxxxxxx>
Date: Sat, 17 Nov 2001 12:17:01 +0200
Hello Michael!

> I mean that I seem to have trouble accessing my cdata "This is my" and
> "text." from something such as this common lil structure:
> 
> <p> This is my <b> bold </b> text. </p>
Oh, I misunderstood you. That all right and there is no problem, character data can be selected by nodetest "text()".
Try to imagine your xml snippet as xpath data model tree:

element p
  |
  +------ text node " This is my "
  |
  +------ element b
  |             |
  |             +------- text node " bold "
  |
  +------ text node " text. "

so you can select text "This is my" by "p/text()[1]" xpath expression etc.

> 
> Am I not supposed to format XML that way or am I just trying to access the
> text in some incorrect way?
No, mixed content is a legal form of conent model in xml.

---
Oleg Tkachenko,
Multiconn International, Israel 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread