xsl-list
[Top] [All Lists]

How to reference nodes that have not yet been created ?

2003-10-17 11:54:09
Hi all and thanks,
How to reference nodes that have not yet been created (i.e located on the
xml file you want to generate)?

Example:
    I have an xsl program that creates datatypes at the begining of the
file. I     have then to reference them every time that i encounter a
variable with     a given type.



<xsl:template name="createDataTypes">
     <dataType>
       <xsl:attribute name="id"><xsl:value-of
select="generate-id.)"/></xsl:attribute>
       <xsl:attribute name="name">integer</xsl:attribute>
     </dataType>
        ...
</xsl:template>

<xsl:template match="myVariable">
    <variable>
        <xsl:attribute name="id"><xsl:value-of
select="generate-id(.)"/></xsl:attribute>
        <xsl:attribute name="name">integer</xsl:attribute>
        <xsl:attribute name="type"><xsl:value-of
select="#####getTypeID######"></xsl:attribute>
     </variable>
        ...
</xsl:template>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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