[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Understanding why <tag></tag> is the way it is (wa
On 04/08/07, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote: > MSXML modifies its behaviour when the stylesheet literal > result element is in the HTML namespace. Your finding is a big step forward in understanding various MSXML quirks, thank you! > But still MSXML is going beyond the specification by noting the > choice of empty element syntax used by an XML instance. Stylesheet > writers cannot depend on this in the general case as it is an MSXML quirk. Agreed! I use XSLT 1.0 only for client-side, browser initiated transformations (using XSLT 2.0 Saxon otherwise) and tend to ignore other configurations. In the future I will be more careful to state this in my assertions. Manfred On 04/08/07, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote: > At 2007-08-03 22:58 +0200, Manfred Staudinger wrote: > >On 03/08/07, G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx> wrote: > > > t:\ftemp>xslt-msxsl manfred.xsl manfred.xsl con > > > <body> > > > <div style="display: none"></div> > > > <div style="display: none"></div> > > > </body> > >In my test the last div is serialized as <div style="display: none" /> ! > > > > > Why do you think the serialization by MSXML of the two is the same? > >My turn, sure. > > :{)} > > >I've set up a test at... > > Thank you ... by downloading your test I found the difference. > > >Thinking about possible causes, what version of MSXML do you use? > > It isn't a difference the version of the MSXML processor ... the > difference turns out to be in the stylesheet markup. This took a > while to narrow down, but the example below shows that MSXML modifies > its behaviour when the stylesheet literal result element is in the > HTML namespace. There is only a one-line difference between > manfred.xsl and manfred3.xsl, that being the namespace declaration. > > So we were both right about our respective tests ... we were just > comparing apples and oranges. > > But still MSXML is going beyond the specification by noting the > choice of empty element syntax used by an XML instance. Stylesheet > writers cannot depend on this in the general case as it is an MSXML quirk. > > An interesting exercise, Manfred ... thank you. > > . . . . . . . . . . . . Ken > > t:\ftemp>type manfred.xsl > <?xml version="1.0" encoding="US-ASCII"?> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version="1.0"> > > <xsl:output method="html"/> > > <xsl:template match="/"> > <body> > <div style="display: none"></div> > <div style="display: none"/> > </body> > </xsl:template> > > </xsl:stylesheet> > > t:\ftemp>xslt-msxsl manfred.xsl manfred.xsl con > <body> > <div style="display: none"></div> > <div style="display: none"></div> > </body> > > t:\ftemp>type manfred3.xsl > <?xml version="1.0" encoding="US-ASCII"?> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns="http://www.w3.org/1999/xhtml" > version="1.0"> > > <xsl:output method="html"/> > > <xsl:template match="/"> > <body> > <div style="display: none"></div> > <div style="display: none"/> > </body> > </xsl:template> > > </xsl:stylesheet> > > t:\ftemp>xslt-msxsl manfred3.xsl manfred3.xsl con > <body xmlns="http://www.w3.org/1999/xhtml"> > <div style="display: none"></div> > <div style="display: none"/> > </body> > > t:\ftemp> > > > -- > Upcoming public training: XSLT/XSL-FO Sep 10, UBL/code lists Oct 1 > World-wide corporate, govt. & user group XML, XSL and UBL training > RSS feeds: publicly-available developer resources and training > G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx > Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ > Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) > Male Cancer Awareness Jul'07 http://www.CraneSoftwrights.com/s/bc > Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|