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

Re: Understanding xmlns declaration and encoding

Subject: Re: Understanding xmlns declaration and encoding
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 8 Sep 2004 16:48:33 +0100
xmlns declaration
  <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">


That change has nothing to do with encodings it is like changing from
FORTRAN to C. The first version is a declaration of a stylesheet written
in XSLT, the second is the declaration of a stylesheet for the almost
completely different language that was built into early versions of
msxml (and so IE5) but not supported in current Microsoft products, and
never supported anywhere else. Microsoft somewhat unhelpfully
document that language as being called "XSL" but it was based on a very
early draft of XSL(T) and only ever had a passing resemblance even to
that draft.

> Most of our code is pre XSLT1.0 

given that XSLT dates from 1999 and XML itself is only a year earlier,
one has to ask _why_ one would still have code written to that non
standard Microsoft dialect?

> removed all of the above fixes and narrowed it down to to the new
> namespace decleration: xmlns="http://www.w3.org/1999/xhtml".

If you are outputting html the html output method will automatically add
a meta element to the result, however if you are outputting xhtml using
the xml output method (which would be the default)  then no meta element
is automatically added.

Note that also the final encoding depends on the way you call msxml if
you are writing directly to a file from msxsl the declarations regarding
encoding in xsl:output will take effect but if you just output the
result as an in memory dom and then later serialise that dom, it will be
the dom that controls such issues as encoding chosen, not the xsl:output
statement.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.