(no subject)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

mark.billingham
Hello, I have a small problem with a disparity with an Xquery
Output and an XSL translation.

I have some test data with an attribute string which has some encoding
in.
Not sure if is UTF-8 but it is the british Pound sign which translates
as two bytes
In the source data: \xC2 and \xA3.


When I process using XSL the data either passes through un-harmed or in
html
Mode becomes "£" which is fine. But when I Xquery it, the fist
byte
Is lost and it becomes just \xA3 (\0243).
Which is a pain because this causes further Saxon processing to fall
over reporting
An illegal character.
This is seen in out-xq.xml which will not display in explorer.


I've tidied up and simplified the problem to the bare bones.
I've attached the (very small) query and data files.

Here are my test runs: (files attached)
Using:SAXON 7.7 from Michael Kay
uname -a
SunOS primadtpdev 5.8 Generic_108528-20 sun4u sparc SUNW,Ultra-250

These are the commands I use:

xq='java -Xmx512M -cp /export/home/billym/app/saxon/saxon7.jar
net.sf.saxon.Query'
xt='java -Xmx512M -jar /export/home/billym/app/saxon/saxon7.jar'

The TEST
xq test.xq > out-xq.xml  
xt test_data.xml test2html.xsl > out-xsl.html
xt test_data.xml test2text.xsl > out-xsl.xml


Any help would be aprreciated.


test.xq (136 bytes) Download Attachment
test2html.xsl (366 bytes) Download Attachment
test2text.xsl (404 bytes) Download Attachment
test_data.xml (378 bytes) Download Attachment
out-xq.xml (378 bytes) Download Attachment
out-xsl.html (152 bytes) Download Attachment
out-xsl.xml (214 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: XQuery output encoding (was no subject)

Michael Kay
Sorry for the delay in responding.

Saxon 7.7 is now over 2 years old and there have been about a dozen releases
since then. It was also one of the first releases that supported XQuery. I
tried your files on the current release, Saxon 8.5.1, and they produce the
correct output.

The problem appears to be bug

http://sourceforge.net/tracker/index.php?func=detail&aid=891839&group_id=298
72&atid=397617

which was fixed in Saxon 7.9, released in March 2004.

Michael Kay
http://www.saxonica.com/



> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> [hidden email]
> Sent: 25 October 2005 10:08
> To: [hidden email]
> Subject: [saxon] (no subject)
>
> Hello, I have a small problem with a disparity with an Xquery
> Output and an XSL translation.
>
> I have some test data with an attribute string which has some encoding
> in.
> Not sure if is UTF-8 but it is the british Pound sign which translates
> as two bytes
> In the source data: \xC2 and \xA3.
>
>
> When I process using XSL the data either passes through
> un-harmed or in
> html
> Mode becomes "£" which is fine. But when I Xquery it, the fist
> byte
> Is lost and it becomes just \xA3 (\0243).
> Which is a pain because this causes further Saxon processing to fall
> over reporting
> An illegal character.
> This is seen in out-xq.xml which will not display in explorer.
>
>
> I've tidied up and simplified the problem to the bare bones.
> I've attached the (very small) query and data files.
>
> Here are my test runs: (files attached)
> Using:SAXON 7.7 from Michael Kay
> uname -a
> SunOS primadtpdev 5.8 Generic_108528-20 sun4u sparc SUNW,Ultra-250
>
> These are the commands I use:
>
> xq='java -Xmx512M -cp /export/home/billym/app/saxon/saxon7.jar
> net.sf.saxon.Query'
> xt='java -Xmx512M -jar /export/home/billym/app/saxon/saxon7.jar'
>
> The TEST
> xq test.xq > out-xq.xml  
> xt test_data.xml test2html.xsl > out-xsl.html
> xt test_data.xml test2text.xsl > out-xsl.xml
>
>
> Any help would be aprreciated.
>
>




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help