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

RE: Processing text in XSL

Subject: RE: Processing text in XSL
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Mon, 10 Jan 2005 11:17:05 -0000
xslt change all text
> I would like to transform an XML document with XSL but I
> would like to change all text nodes and attribute values
> before starting the XSL transformation. For example, I would
> like to change all text nodes and attribute values to
> uppercase. I know I can do this in the XSL sheet but is there
> a way to do this at the SAX level?

Yes - but as it doesn't involve XSLT it's a bit off topic for this list.
You could do it in XSLT as a two-pass transform in the same stylesheet:
perform an identity transform in a top-level variable that converts
attribute values and text nodes to uppercase, and then in your root
matching template apply-tempaltes on that variable.

If you really want to do it at the SAX level, I would recommend looking
up SAXTransformerFactory first and work from there. Basically you want
to write an XMLFilter and chain it between an XMLReader and a
TransformerHandler.

cheers
andrew

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.