[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl:import help

Subject: xsl:import help
From: "Selva, Francis" <Francis.Selva@xxxxxxxxxxxxxxx>
Date: Fri, 31 Mar 2000 08:58:55 -0800
xsl variable xsl import
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.