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

Template/for-each/Firefox

Subject: Template/for-each/Firefox
From: Brett Zamir <brettz9@xxxxxxxxx>
Date: Thu, 01 Sep 2005 09:30:22 -0700
firefox templates
Along the lines of the question of the difference between for-each and
apply-templates, when trying to transform, the following I get different
results from the subsequent stylesheets (the text after the embedded element
doesn't show up in the latter, even if I included another text() value-of
statement), and I don't know why.

I also don't know why I need to specify "/pars" in the last template as I
thought "pars" is already the root (if I don't do it, Firefox will not show
anything).

Also, I don't understand why in Firefox, refreshing the page does not always
accurately reflect the changes I've made...I have to sometimes close the tab
and start another one to see the changes. Some caching problem or?

I am also having trouble figuring out why call-template does not seem to
work for me (using it like apply-templates but for just one template).

thanks in advance,
Brett



<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<pars>
<par>The first part <embedded>comes before</embedded> the second part</par>
<par>The third part <embedded>also comes before</embedded> the fourth
part</par>
</pars>

-----------------------------------

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>

<xsl:template match="/">
    <xsl:apply-templates/>
</xsl:template>

<xsl:template match="embedded">
    <b><xsl:value-of select="."/></b>
</xsl:template>

<xsl:template match="text()">
    <b><xsl:value-of select="."/></b>
</xsl:template>

</xsl:stylesheet>


-----------------------------------


<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>

<xsl:template match="/pars">
    <xsl:for-each select="par">
        <b><xsl:value-of select="text()"/></b>
        <b><xsl:value-of select="embedded"/></b>
    </xsl:for-each>
</xsl:template>

</xsl:stylesheet>

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.