xsl-list
[Top] [All Lists]

AW: AW: Instant Saxon

2003-09-01 07:09:04
Hi Michel,

first, try using uppercase letters for the encoding:
<xsl:output method="xml" encoding="UTF-8"/>

If this doesn't work, try omitting the whole xml declaration with
<xsl:output method="xml" omit-xml-declaration="yes"/>

If this also doesn't work, try inserting a faked xml declaration with
disabled output escaping (this is the worst solution as it is not
supported in all xslt processors / serializers):
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:template match="/">
  <xsl:text disable-output-escaping="yes">&lt;?xml version="1.0"?></xsl:text>
  [...]
</xsl:template>

Or, use some other tool to adjust the xml declaration for XSU.

Regards,
Markus
__________________________
Markus Abt
Comet Computer GmbH
http://www.comet.de


----------
Von:    michel geadah
Gesendet:       Montag, 1. September 2003 15:11
An:     xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Betreff:        Re: AW: [xsl] Instant Saxon

hi Markus,
I do not want any encoding declaration in the result because i want to 
insert this file into a database and XSU package seems to accept only file 
with <?xml version="1.0" ?> headers...
Is there a way to take of the encoding from the output?

Thanks...

From: Markus Abt <abt(_at_)comet(_dot_)de>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: "'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'" 
<xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: AW: [xsl] Instant Saxon
Date: Mon, 1 Sep 2003 13:53:51 +0200

Hi Michel,

this is not saxon specific.
The way saxon does that is correct, as it does not introduce
whitespace nodes that are not allowed.

If additional whitespace nodes are ok for you, you may try:
<xsl:output method="xml" indent="yes"/>
in the beginning of your stylesheet. It will not look exactly like
I.E.'s treeview, but may be ok for you.

For a different encoding, use the encoding attribute of <xsl:output>,
for example:
<xsl:output method="xml" indent="yes" encoding="iso-8859-1"/>

If you instead want utf-8 encoding but no encoding declaration
in the result, then let me ask, why?

Regards,
Markus
__________________________
Markus Abt
Comet Computer GmbH
http://www.comet.de


----------
Von:   michel geadah
Gesendet:      Montag, 1. September 2003 09:44
An:    XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Betreff:       [xsl] Instant Saxon

I am using oracle 8.1.7 database on windows2000 advanced server.I am using
Instant saxon in order to transform XML documents into new XML documents.I
am providing the Instant Saxon with the source XML document and XSL
document.Its output in the IE6.0 is just fine like this:

<?xml version="1.0" encoding="utf-8" ?>
<WRATE_INDICATORS>
<mappings>
  <RIND_CURR_CODE_1>119</RIND_CURR_CODE_1>
  <RIND_CURR_CODE_2>131</RIND_CURR_CODE_2>
  <RIND_INDICATOR>1</RIND_INDICATOR>
</mappings>
<mappings>
  <RIND_CURR_CODE_1>119</RIND_CURR_CODE_1>
  <RIND_CURR_CODE_2>136</RIND_CURR_CODE_2>
  <RIND_INDICATOR>1</RIND_INDICATOR>
</mappings>
</WRATE_INDICATORS>

But when i press view->source to see it in text file i get the following
output:

<?xml version="1.0"
encoding="utf-8"?><WRATE_INDICATORS><mappings><RIND_CURR_CODE_1>119</RIND_CURR_CODE_1><RIND_CURR_CODE_2>131</RIND_CURR_CODE_2><RIND_INDICATOR>1</RIND_INDICATOR></mappings><mappings><RIND_CURR_CODE_1>119</RIND_CURR_CODE_1><RIND_CURR_CODE_2>136</RIND_CURR_CODE_2><RIND_INDICATOR>1</RIND_INDICATOR></mappings></WRATE_INDICATORS>

Does the instant Saxon always do that??...Is there a way or maybe another
processor in order to get the output in text file the same as IE6.0. Can i
generate the file without the (encoding="utf-8") in the beginning of the
file?
Thanks a lot...

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail


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



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


_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


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



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



<Prev in Thread] Current Thread [Next in Thread>