[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Understanding xmlns declaration and encoding

Subject: Understanding xmlns declaration and encoding
From: karl@xxxxxxxxxxxxxxxxxxxx
Date: Wed, 8 Sep 2004 09:35:03 -0600 (CST)
content type utf 16
Hello,

We are/were having troubles with the final encoding of our stylesheets. 
The end result is always UTF-16, which causes some issues on MACS.  I did
come up with a solution and that was to add the following declaration to
our stylesheets:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" xmlns="http://www.w3.org/1999/xhtml">

This use to be written as:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

Most of our code is pre XSLT1.0 standards and in fact there are many cases
where we are still using the "order-by" property for an apply-templates
rule.

Before the above fix, I tried the following:
- made sure the XML source was UTF-8 encoded
- added the UTF-8 encoding to the output rule for the stylesheet
- manually added meta content type = UTF-8 to the head of the stylesheet
(which would result in a duplication of this tag)

This fix, it basically removes any meta tag content type declerations,
unless I explicitly put one there, where as before MSXML was throwing in
their own - the UTF-16 encoding, which is a problem for me.

The resulting HTML tag looks like this:
<HTML xmlns="http://www.w3.org/1999/xhtml">

And in an effort to make sure I understood what exactly was fixing the
automatic insertion of the meta tag content-type UTF-16 into my HEAD, I
removed all of the above fixes and narrowed it down to to the new
namespace decleration: xmlns="http://www.w3.org/1999/xhtml".

Can someone shed some light on all of this?  Is this all normal behaviour?
 My suggested *fix* above, is this the best way / most standard way to
write my xsl:stylesheet rule for intendid HTML output?

Thanks,

Karl

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.