xsl-list
[Top] [All Lists]

[xsl] [XSLT] Asking or Update variable

2008-03-12 04:55:01
Hello everybody!

I need do some things which depends 
on the value of the one variable.

This is my XSL:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="2.0"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>

    <xsl:param name="class">PersonList</xsl:param>
    <xsl:param name="subclass">rdfs:subClassOf</xsl:param>

    <xsl:template match="rdf:RDF">

      <xsl:for-each select="child::node()[(_at_)rdf:ID=$class]">

             <xsl:for-each select=" child::node()">
                      
                     <xsl:if test="name()=$subclass">

                        <xsl:value-of select="@rdf:resource"/>
                        <xsl:variable 
name="IsSubclass">True</xsl:variable>
                                                              
                     </xsl:if>                     
                                
            </xsl:for-each>                   
        </xsl:for-each>
        
    </xsl:template>  
</xsl:stylesheet>

When for-each extern is finish I need do:

<xsl:choose>
<xsl:when test="IsSubclass=True">
...
</when>
<xsl:otherwise>
.....

</xsl:otherwise>
</choose>


Thank you. Regrads,

Izaskun 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>