[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

following-sibling

Subject: following-sibling
From: "Carole E. Mah" <carole@xxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Mar 2000 19:16:45 -0500 (EST)
naked siblings
Suppose the input document consists of bad HTML, with naked CDATA directly
within BODY:

<body>
 <p>this is ok</p>
 <hr>
 This is <b>bad</b>, naked CDATA, that even <i>Tidy</i> does not rectify.
 <hr>
 <p>this is also ok</p>
</body>

To surround the bad chunk with a <p>, you'd end up with:
  ...
  <p>This is <b>bad</b>, naked CDATA, that even <i>Tidy</i> does not
  rectify.</p>

To do this, one would expect to be able to match the first text()
following an OK block-level element (like <HR>, <P>, <H1> etc), do a
value-of for that node, and then do a copy-of every following-sibling()
that is a non-block element.

One would expect that "This is" is the first text() following the <HR>
and that <b>bad</b> is the first following-sibling, "naked CDATA that
even" is the second following-sibling ( of type text() ), <i>Tidy</i> is
the third following-sibling, and "does not rectify" is the fourth
following sibling (also of type text() ).

However, I have found that this is not the case -- XT/SAXON seem to
to think that the text() following-siblings are not actually siblings.
What I would think of as the second and fourth following-siblings of the
"This is" text() node ("naked CDATA that even" and "does not rectify")
are ignored by the processor, which thinks <b>bad</b> is the first
following-sibling of "This is" and <i>Tidy</i> the second, and ignores the
two intermingled text() nodes.

I know this is not too coherent, but if anyone can understand it, please
tell me where my mis-conception lies.

thanks!
-carole
- - - - - - - - - - - - - - - - - - - - - - - - - 
Carole E. Mah                Carole_Mah@xxxxxxxxx
         Senior Programmer/Analyst
  Brown University Scholarly Technology Group
            phn 401-863-2669
            fax 401-863-9313
         http://www.stg.brown.edu/
 personal: http://www.stg.brown.edu/~carolem/



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.