This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: cdata?
- From: "Oleg Tkachenko" <olegt at multiconn dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Sat, 17 Nov 2001 12:17:01 +0200
- Subject: RE: [xsl] cdata?
- Reply-to: xsl-list at lists dot mulberrytech dot com
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