OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Multibyte output

[ Lists Home | Date Index | Thread Index ]

I am getting really strange output from this XSL transform.

The output  *looks* perfect - however, each character looks as though it was
prodced in UTF-16 (each char is represented in two byes with a leading 00
byte).  Also, the files begins with a char 127 and char 126???  I explicitly
set the encoding to UTF-8 but it still doesn't work.  Trying to save the
output as a ".sql" and then ruunning it in sqlplus fails.

Anyone have any ideas?  

The XSL follows:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
<xsl:output method="text" indent="no"/>
<xsl:variable name="digits" select='-01234567809'/>
<xsl:template match="Import">
	<xsl:for-each select="Row">
		<xsl:text>insert into customer_0_A (</xsl:text>
		<xsl:for-each select="*">
			<xsl:value-of select="name(.)"/>
		<xsl:text>) &#10; values (</xsl:text>	
		<xsl:for-each select="*">
			<xsl:value-of select="."/>
		<xsl:text>); &#10;</xsl:text>		

The transform takes the XML (at bottom) and produces insert statements
for Oralce.

The only thing that made this tough was trying to figure out how/when to put
quotes around strings :-)

A snippet of XML file:

<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by Cutler, Dan
(private) -->
<?xml-stylesheet type="text/xsl" href="C:\TEMP\CME\test_data_import.xsl"?>


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS