[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: karl@xxxxxxxxxxxxxxxxxxxx
Date: Wed, 8 Sep 2004 12:04:37 -0600 (CST)
ixslprocessor output
Hello, I am now transforming the stylesheet using new MSXML2 objects,
including an ixslProcessor and ixslTemplate and invoking to processor with
the Transform method and writing straight to the browser using the
iXslProcessor output method.
The resulting HTML (at the top) looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html">

When I exclude this
xmlns="http://www.w3.org/1999/xhtml"

from the stylesheet decleration, I notice that <br/> tags and <hr/> tags
end up like this: <br> and <hr>.  Including it results in the <html> tag
looking like this:
<HTML xmlns="http://www.w3.org/1999/xhtml">

and the <br> and <hr> tags are now <br/> and <hr/> in the result.

Is this all confirmed and normal behaviour?

I guess I don't understand when:
<xsl:output method="html" encoding="??????????"/>
The encoding has any effect on the outcome.

I am writing my html to the browser after the ixslProcessor tranformation
using the iXslProcessor output method like this:

response.write xslProcObj.output

I am having trouble reproducing my UTF-16 issue with the new MSXML
objects.  I'd like to control the output to reproduce the error...

Karl


>   <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.