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

RE: JAXP - Ignoring whitespaces from a Node object pas

Subject: RE: JAXP - Ignoring whitespaces from a Node object passed as parameter for XSLT transformation
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sun, 16 Oct 2005 17:36:43 +0100
sax whitespaces
> Using the document() function was my previous implementation step: as 
> I'm on the optimization stage now and I need to apply the same 
> transformation to *multiple* XML sources, I'd prefer NOT to 
> load *each* 
> time that *same* nodeset but to pass it as a parameter.

Don't assume that if you call document() twice on the same URI, the document
is automatically loaded and parsed twice. Details are
implementation-dependent.
> 
> As I need such a parameter, IMHO I think that would be much 
> more elegant 
> to serve a nodeset already purged from ignorable whitespaces, 
> instead of 
> having to mind *existing* whitespaces...
> 
> Is there a way to force the XPath parser to spit a resulting Node 
> *without* ignorable whitespaces?

Try building the document using a transformation that strips spaces and does
nothing else; or write a simple SAX filter to do it.

Michael Kay
http://www.saxonica.com/

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.