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

RE: Xpath Question


xpath preserve space
At 2003-07-25 15:01 -0400, Simon St.Laurent wrote:
>Then I guess you're saying that the XPath 1.0 model is useless if you
>want a reliably consistent model of a given XML document?
>
>Oh well.

Don't despair for XSLT 1.0, Simon, I believe it is reliably consistent.  To 
summarize points I made in a post a few moments ago, this time without any 
references to any products whatsoever:

(1) Chapter 17 of http://www.w3.org/TR/1999/REC-xslt-19991116 states "A 
conforming XSLT processor must be able to use a stylesheet to transform a 
source tree into a result tree as specified in this document."

(2) section 3 of http://www.w3.org/TR/1999/REC-xslt-19991116 states "The 
data model used by XSLT is the same as that used by XPath with the 
additions described in this section"

(3) the applicable statements from section 3.4 of 
http://www.w3.org/TR/1999/REC-xslt-19991116 indicate that when an instance 
is being treated as a source file to build a source node tree and the 
stylesheet does not include any <xsl:strip-space> or <xsl:preserve-space> 
instructions then all text nodes in such source node trees are preserved 
because:

   (a) - the element name of the parent of the text node is in the set of 
whitespace-preserving element names
   (b) - for source documents, the set of whitespace-preserving element 
names is specified by xsl:strip-space and xsl:preserve-space top-level elements
   (c) - initially, the set of whitespace-preserving element names contains 
all element names

I see these statements as reliable and unambiguous.  Looking at XSLT 1.0 I 
don't see any other statements that might conflict with the above.

................ Ken


--
Upcoming hands-on courses: in-house corporate training available;
North America public:  XSL-FO Aug 4,2003; XSLT/XPath Aug 12, 2003

G. Ken Holman                mailto:gkholman@C...
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/x/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                      Definitive XSLT and XPath
ISBN 0-13-140374-5                              Definitive XSL-FO
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-11-X              Practical Formatting Using XSL-FO
Member of the XML Guild of Practitioners:    http://XMLGuild.info
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/x/bc


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.