The document seems confusing, the first paragraph is very explicit about white space handling in source document prior to processing the XSL.
The second paragraph talks discusses how WS preserving is specified but also talks about adding/removing NameTest from the WS preserving element names. My read is that the WS preserving elements is first built by the DTD, which is none is supplied it should be empty. i.e. Strip all spaces. Then the Stylesheet has the chance to Add/Remove items from that list using the Top level elements. In the end, if its not in that list then the WS Text node is stripped. Regards John G "Voytenko, Dimitry" wrote: > Thanks. I see it now. Sorry for interfering with wrong information. > > Thanks, > Dmitry > > -----Original Message----- > From: Gary L Peskin [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 20, 2002 14:31 > To: [EMAIL PROTECTED] > Subject: RE: Bug in Xalan 2.4.0 with position() > > Dimitry - > > Keep reading in that section with the paragraph starting "For source > documents, ...". > > Gary > > > -----Original Message----- > > From: Voytenko, Dimitry [mailto:[EMAIL PROTECTED]] > > Sent: Friday, September 20, 2002 2:18 PM > > To: '[EMAIL PROTECTED]' > > Subject: RE: Bug in Xalan 2.4.0 with position() > > > > > > Hi, > > > > What about this quot from XSLT 1.0 specification: > > http://www.w3.org/TR/xslt#strip > > > > <quot> > > 3.4 Whitespace Stripping > > > > After the tree for a source document or stylesheet document > > has been constructed, but before it is otherwise processed by > > XSLT, some text nodes are stripped. A text node is never > > stripped unless it contains only whitespace characters. > > Stripping the text node removes the text node from the tree. > > The stripping process takes as input a set of element names > > for which whitespace must be preserved. The stripping process > > is applied to both stylesheets and source documents, but the > > set of whitespace-preserving element names is determined > > differently for stylesheets and for source documents. .... > > .... </quot> > > > > It looks like specification states, that all ignorable white > > spaces are to be stripped before XSLT transformation starts, > > unless it's defined otherwise. > > > > Thanks, > > Dmitry > > > > -----Original Message----- > > From: Joseph Kesselman [mailto:[EMAIL PROTECTED]] > > Sent: Friday, September 20, 2002 14:05 > > To: [EMAIL PROTECTED] > > Subject: Re: Bug in Xalan 2.4.0 with position() > > > > > > On Friday, 09/20/2002 at 04:40 AST, "Scott Moore" > > <[EMAIL PROTECTED]> > > wrote: > > > > > parser.setFeature("http://apache.org/xml/features/dom/include- > > ignorable-whit > > > espace", true); > > > > > > Shouldn't this remove all whitespace nodes? I do the transform > > > directly > > on > > > the already parsed DOM. > > > > That's a Xerces question rather than a Xalan question, but: > > > > 1) You said include=true, which is the opposite of what you > > seem to want. > > > > 2) Ignorable whitespace is a bad term. It's really > > "whitespace in element > > content". This is only recognized if you know what is and > > isn't element > > content -- in other words, if you have validated the document > > against a > > DTD (or _maybe_ a schema, though schema validation tends to > > annotate the > > Infoset rather than changing it and thus may not affect us > > until XSLT 2.0 > > adds schema awareness... and maybe not then). > > > > ______________________________________ > > Joe Kesselman / IBM Research > > -- -------------------------------------- John Gentilin Eye Catching Solutions Inc. 18314 Carlwyn Drive Castro Valley CA 94546 Contact Info [EMAIL PROTECTED] Ca Office 1-510-881-4821 NJ Office 1-732-422-4917
