xsl-list
[Top] [All Lists]

RE: Processing text in XSL

2005-01-10 04:17:05

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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>