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

ie namespace and doctype was Re: xhtml xslt file: popu

Subject: ie namespace and doctype was Re: xhtml xslt file: populating javascript array with data from xml file?
From: "cutlass" <cutlass@xxxxxxxxxxx>
Date: Fri, 29 Jun 2001 10:05:38 +0100
doctype namespace
btw the example here is old M$ namespace which means nothing to this list,
look at www.netcrucible.com

another new M$ thing, that has nothing to do with xslt but may cause some
strange effects ( that could be attributed to xslt ) is that in IE6 the
browser responds to !DOCTYPE tag.

take a look here
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/css/overv
iew/cssenhancements.asp

which means when you use an innocent xsl:output tag ( such as below which
instructs to generate a !DOCTYPE ) u may all of a sudden see some different
things in IE6;

<xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD HTML
4.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/REC-html4/loose.dtd" indent="yes"/>

cheers, jim fuller

----- Original Message -----
From: "Dominic J. Blythe" <Dominic.Blythe@xxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, June 29, 2001 9:32 AM
Subject: RE:  xhtml xslt file: populating javascript array with data
from xml file?


> this works fine in ie5 to get the answer attribute
> into position [id attribute] in an array called questions.
>
> <?xml version="1.0"?>
> <xsl:stylesheet
>   xmlns:xsl="http://www.w3.org/TR/WD-xsl"
>   xmlns="http://www.w3.org/TR/REC-html40"
>   result-ns="">
>
> <output method="html" version="4.0" encoding="ISO-8859-1"
> media-type="text/html"/>
> <xsl:template match="/">
> <script><![CDATA[ questions = new Array(); ]]></script>
> <xsl:apply-templates select = "question"/>
> </xsl:template>
> <xsl:template match="question">
> <script>questions[<xsl:value-of select="@id"/>]
> =<xsl:value-of select="@answer" />;</script>
> </xsl:template>
> </xsl:stylesheet>
>
> I expect something similar is possible in any xslt interpreter.
>
>
> Anthony E wrote:
> >
> > any ideas on how i can set the variables/arrays in my
> > javascript with data from my xml file?
> >
>
> <question id="1" answer="2">
> What time is it?
>   <choice id="1">a) daytime</choice> **(close the tag you openened)
>   <choice id="2">b) nighttime</choice> **
>   <explanation>answer is "b" because it is dark
> outside.</explanation>
> </question>
>
>
>
> ______________________________________________________________________
> Dominic Blythe
> Programmer
> BCP Ltd
>
> BCP House, 151 Charles St, Stockport, SK1 3JY  UK
> t: 0161 355 3000 f: 0161 355 3001
> e: dominic.blythe@xxxxxxxxxxxxxxx
> _____________________________________________________________________
> /*  It's nice to be important, but it's more important to be nice  */
> >
> >
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


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


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.