This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xsl:import help
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: xsl:import help
- From: "Selva, Francis" <Francis dot Selva at purchasepro dot com>
- Date: Fri, 31 Mar 2000 08:58:55 -0800
- Reply-To: xsl-list at mulberrytech dot com
Hi,
I gave this question before but I guess the information was not enough.I
have 2 XSL files and 1 XML file.Is it possible for me access the
xsl:variable values declared in one XSL file in another XSL file.These are
the files...
a.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="text1">Please Enter Your ID and
Password</xsl:variable>
<xsl:variable name="text2">User ID: </xsl:variable>
<xsl:variable name="text3">Password: </xsl:variable>'
</xsl:stylesheet>
b.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="a.xsl"/>
<xsl:template match="/">
<xsl:for-each select="Login">
<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:for-each>
</xsl:template>
</xsl:stylesheet>
c.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="b.xsl"?>
<Login>
<Loginscreen username="abc"/>
</Login>
Is this correct?.If not,can anyone tell me how to achieve this?.I need to
access both the attributes in the XML file as well as the variables in a
separate XSL file.Can I use the same namespace for accessing the attribute
values?
Thanx,
Francis
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list