|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:import help
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








