Subject: Re: Unparse-text() string contains ascii chars 29, 30 and 31
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Wed, 19 Oct 2005 17:18:26 +0100
|
On 19 Oct 2005 17:13:24 +0100, Colin Paul Adams
<colin@xxxxxxxxxxxxxxxxxx> wrote:
> >>>>> "andrew" == andrew welch <andrew.j.welch@xxxxxxxxx> 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, '')
>
> andrew> or
>
> andrew> substring-before($str, '')
>
> 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.
Ha! Almost..... (would've been a great workaround)
I now get the error:
XTDE1180: The unparsed-text file contains a character illegal in XML
(line=1 column=15 value=hex 1f)
Transformation failed: Run-time errors were reported
Which makes me think Saxon (851b) is checking the string....
|