This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

new to XML/XSL - having problems with broswer compatibility and functions


Hello list,

I'm just getting started developing an XSL stylesheet for displaying metadata from XML files for various datasets, and I need some help with the programming. Here is my situation:

I have a stylesheet that works in IE5.5 and up, but no versions of Netscape. The original header/namespace for this XSL document that was used is "<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"; TYPE="text/javascript">".

When I changed this to "<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">" the stylesheet would work in Netscape 6.2, and sort-of load in IE5.5 (but not IE6). Now my problem is that some of the code that was previously used no longer works.

First of all, I am no longer able to specify the <BODY> properties - as soon as I do this, all the XSL commands become invalid expressions.

Next, and more importantly, I need to be able to list the characteristics of multiple attributes (i.e. many "attr" tags in the XML file) in a table.

This is how it was previously done:

The following line was used to check if any "attrlabl" elements were used for any of the "attr" tags within the "context" path.

<xsl:if test="context()[attr/attrlabl[. != '']]">

This command was repeated to determine if any other elements within the "attr" tags were used, and if so, an appropriate column would be added to a table. The problem here is that "context()" is apparently no longer a valid function (as IE6 indicated)

In the following loop, the contents of each "attr" tag was added to the table as a row:

<xsl:for-each select="attr[attrlabl != '']">
<tr bgcolor="#ffffff">
<!-- Write out the name of the attribute -->
<xsl:for-each select="attrlabl">
<td>
<DIV CLASS="attribute"><font color="#000000" face="Arial, Helvetica, sans-serif" size="2"><xsl:value-of /></font></DIV>
</td>
</xsl:for-each>
.....
</tr>
</xsl:for-each>

The problem with this part of the code is that IE6 does not like the <xsl:value of /> being used without a select="" statement in it. I don't know if this is a result of some other error, or if I should be doing this some other way.

Also, I don't seem to be able to add any javascript to the document.

I would greatly appreciate if anyone could offer some suggestions, or perhaps point me to a helpful source.

Kind regards,
Michael Leahy





----------------------------------------------------------------------------------
Michael Leahy, Computing and Data Resource Assistant
Mapping, Analysis and Design, ES2-163C
Faculty of Environmental Studies
University of Waterloo
Waterloo, Ontario, N2L 3G1.
E-mail: mgleahy@fes.uwaterloo.ca
Phone: 519-888-4567 ext. 6727
Fax: 519-888-4325
----------------------------------------------------------------------------------


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]