Subject: ie namespace and doctype was Re: [xsl] xhtml xslt file: populating javascript array with data from xml file? From: "cutlass" <cutlass@xxxxxxxxxxx> Date: Fri, 29 Jun 2001 10:05:38 +0100 |
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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xhtml xslt file: populati, Dominic J. Blythe | Thread | [xsl] org.apache.xalan.xslt.XSLProc, Heather Lindsay |
RE: [xsl] org.apache.xalan.xslt.XSL, Michael Kay | Date | RE: [xsl] Count all the following n, Michael Kay |
Month |