Subject: following-sibling From: "Carole E. Mah" <carole@xxxxxxxxxxxxxxxxxx> Date: Tue, 14 Mar 2000 19:16:45 -0500 (EST) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Trying to create <a href=xxx> u, Way, Janet | Thread | Re: following-sibling, Steve Tinney |
xsl parent, Paul Beer | Date | Re: following-sibling, Steve Tinney |
Month |