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

Re: Converting &, >, <, ", and other odd-ball characte

Subject: Re: Converting &, >, <, ", and other odd-ball characters...
From: Elizabeth Barham <lizzy@xxxxxxxxxxxxxxxxx>
Date: 23 Jul 2003 20:27:04 -0500
converting and
Mike writes:

> Does this have *anything* to do with XSLT?  If not, it does not
> belong on this list.

I'm sorry Mike. I read this particular thread:

http://www.biglist.com/lists/xsl-list/archives/200102/msg00825.html

and since it is similar in scope and no qualms were raised about it
then, I assumed asking this question to this list would be okay.

> Please read up on character encoding, what a character reference is,
> and what an entity reference is. You seem to be confused about them.

> As for why the behavior changed when you changed JDKs, it's probably
> because some code you haven't shown us is relying on a platform
> default encoding somewhere.

> As for why "?" or its bytewise equivalent in some encoding might
> appear in an encoded byte stream or Unicode string, it's because
> some codecs, such as Java's, will replace unencodable characters or
> undecodable bytes with a question mark.

Is it possible to bypass this mechanism? I would like to pass a byte
into Java and not have it modified in anyway.

But, I *do* have an XSLT question to ask as and addendum. What is the
best way to drive the xml input of an XSLT formatter from inside a
java class? 

For example, let us say that I have an XSLT stylesheet that is set up
to expect a certain format, and I have a java class whose data I would
like to have processed by said stylesheet. It seems a waste to make a
StringBuffer of things like "<?xml version='1.0'?><doc><t>x</t></doc>"
and then pass it into the transformer since it would be possible to
generate the SAX events from within the Java class.

Looking at javax.xml.parsers.SAXParser, I notice the parse() function,
but those seem to be dealing with incoming streams and not events.

Thank you,
Elizabeth


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.