This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: xsl:import help
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: xsl:import help
- From: "Selva, Francis" <Francis dot Selva at purchasepro dot com>
- Date: Fri, 31 Mar 2000 10:30:19 -0800
- Reply-To: xsl-list at mulberrytech dot com
>
> > Is it possible for me access the xsl:variable values
> yes it is, couldn't you just have tried it?
I tried it as u can see from the example but for some reason its not showing
in IE5 if I import the xsl file with xsl:variables.But if I give the
xsl:variable in one file,I mean there is only one xsl file,it's working.
>
> <xsl:template match="/">
> <xsl:for-each select="Login">
>
> why the for-each here? there can only ever be one child of
> the root node
> it would be simpler just to go
>
> <xsl:template match="Login">
Well I have just started exploring.So thanx for the tip.
>
>
> > Can I use the same namespace for accessing the attribute values?
> I didn't understand this question, you are not using
> namespaces in your
> input or output documents, clearly you have to use the xsl
> namespace in
> the xsl files, otherwise they are not xsl.
David,I guess Im using the xsl namespace.Unless if I havent understood
totally what is namespace,I guess Im right.Please let me know why u think
so?.This is the code again
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="a.xsl"/>
<xsl:template match="Login"> <!-- Changed it according to ur tip
David :) -->
<xsl:for-each select="Loginscreen">
<xsl:value-of select="$text1"/>
<xsl:value-of select="$text2"/>
<xsl:value-of select="@username"/> <!-- From the XML
file -->
<xsl:value-of select="$text3"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
My question was if I give this namespace URI,then the attribute @username
never shows up.But if I use 2 different namespaces,one for importing xsl
file variables and other one for attribute from xml,the attribute is showing
in IE5.The changed code will be
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
xmlns:xslnew="http://www.w3.org/1999/XSL/Transform">
<xslnew:import href="a.xsl"/>
<xsl:import href="a.xsl"/>
<xsl:template match="Login">
<xsl:for-each select="Loginscreen">
<xslnew:value-of select="$text1"/>
<xslnew:value-of select="$text2"/>
<xsl:value-of select="@username"/> <!-- From the XML
file -->
<xslnew:value-of select="$text3"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
why is that?.Is it something to do with IE5?.
Francis
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list