xsl-list
[Top] [All Lists]

Re: Unparse-text() string contains ascii chars 29, 30 and 31

2005-10-19 09:13:24
"andrew" == andrew welch 
<andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com> writes:

    andrew> I'm trying to process some data that's one long string
    andrew> delimited using ascii characters 29, 30 and 31 (which are
    andrew> apparently group, record and unit 'separator characters').

    andrew> I can get access to the string using unparsed-text(), but
    andrew> when I attempt to process the string using any of the
    andrew> function eg:

    andrew> tokenize($str, '&#29;')

    andrew> or

    andrew> substring-before($str, '&#31;')

    andrew> ...the XML parser complains that these aren't legal XML
    andrew> characters (when the stylesheet itself is parsed).

Well, they aren't in XML 1.0 but they are in 1.1.
So if you edit the XML declaration, to specify 1.1, and if your parser
supports XML 1.1, your home and dry.
-- 
Colin Adams
Preston Lancashire

--~------------------------------------------------------------------
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>
--~--