Altova Mailing List Archives


Filtering on element

From: "Paul Beer" <paul.beer@------------>
To:
Date: 2/22/2000 1:44:00 PM
I am trying to populate child nodes of an element based on a filter.


i want to be able to show:


<field name='INFO_REC'><string>1</string><string>1</string></field>
<field
name='MATERIAL'><string>Zirconium</string><string>Platinum</string></field>
<field name='MAT_GRP'><string>Zirconium Encrusted</string><string>Platinum
Plus</string></field>
<field name='VENDOR'><string>Acme Inc.</string><string>Zeus Shield
Inc.</string></field>
<field name='DELETE_IND'><string></string><string></string></field>
<field
name='CREATED_AT'><string>19991224</string><string>19991224</string></field>
<field name='CREATED_BY'><string>Frank
Zappa</string><string>Paul</string></field>
<field name='SHORT_TEXT'><string>An implement of torture for recalcitrant
muscisians</string><string>Our diamonds are trillion cut.</string></field>
<field name='SORTED_BY'><string></string><string></string></field>
<field name='PO_UNIT'><string></string><string></string></field>


my xsl code transforms the <field name='INFO_REC'> node, but I cant figure
out how to create the <string> values of this node  based on a filter via
<field name>.

I have posted sample code.... I'm at my wits end, could someone help with
this ?

_____________________________

xsl code:
*** xml doc posted below
_____________________________

<xsl:template name="GetRecords">
	<xsl:for-each
select="BusinessObject/Export/Table/Record[1]/Parameter/@Name">
   	<xsl:variable name="nametemp"><xsl:value-of select="."/></xsl:variable>
	<xsl:element name="field">
	<xsl:attribute name="name"><xsl:value-of
select="$nametemp"/></xsl:attribute>
		<xsl:call-template name="GetRecordValues"/>
	</xsl:element>
	</xsl:for-each>
</xsl:template>

<xsl:template name="GetRecordValues">
	<xsl:element name="string">test dump</xsl:element>
</xsl:template>


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

produces :


<field name="INFO_REC">
<string>Test Dump</string>
</field>
<field name="MATERIAL">
<string>Test Dump</string>
</field>
<field name="MAT_GRP">
<string>Test Dump</string>
</field>
<field name="VENDOR">
<string>Test Dump</string>
</field>
<field name="DELETE_IND">
<string>Test Dump</string>
</field>
<field name="CREATED_AT">
<string>Test Dump</string>
</field>
<field name="CREATED_BY">
<string>Test Dump</string>
</field>
<field name="SHORT_TEXT">
<string>Test Dump</string>
</field>
<field name="SORTED_BY">
<string>Test Dump</string>
</field>
<field name="PO_UNIT">
<string>Test Dump</string>
</field>
</recordset>



_________________________________________


xml doc
________________________________________


<Record>
            <Parameter
               Name="INFO_REC"
               Type="C"
               Length="10"
            >1</Parameter>
            <Parameter
               Name="MATERIAL"
               Type="C"
               Length="18"
            >Zirconium</Parameter>
            <Parameter
               Name="MAT_GRP"
               Type="C"
               Length="9"
            >Zirconium Encrusted</Parameter>
            <Parameter
               Name="VENDOR"
               Type="C"
               Length="10"
            >Acme Inc.</Parameter>
            <Parameter
               Name="DELETE_IND"
               Type="C"
               Length="1"
            ></Parameter>
            <Parameter
               Name="CREATED_AT"
               Type="D"
               Length="8"
            >19991224</Parameter>
            <Parameter
               Name="CREATED_BY"
               Type="C"
               Length="12"
            >Frank Zappa</Parameter>
            <Parameter
               Name="SHORT_TEXT"
               Type="C"
               Length="40"
            >An implement of torture for recalcitrant muscisians</Parameter>
            <Parameter
               Name="SORTED_BY"
               Type="C"
               Length="10"
            ></Parameter>
            <Parameter
               Name="PO_UNIT"
               Type="C"
               Length="3"
            ></Parameter>
         </Record>
		   <Record>
            <Parameter
               Name="INFO_REC"
               Type="C"
               Length="10"
            >2</Parameter>
            <Parameter
               Name="MATERIAL"
               Type="C"
               Length="18"
            >Platinum</Parameter>
            <Parameter
               Name="MAT_GRP"
               Type="C"
               Length="9"
            >Platinum Plus</Parameter>
            <Parameter
               Name="VENDOR"
               Type="C"
               Length="10"
            >Zeus Shield Inc.</Parameter>
            <Parameter
               Name="DELETE_IND"
               Type="C"
               Length="1"
            ></Parameter>
            <Parameter
               Name="CREATED_AT"
               Type="D"
               Length="8"
            >19991224</Parameter>
            <Parameter
               Name="CREATED_BY"
               Type="C"
               Length="12"
            >Paul</Parameter>
            <Parameter
               Name="SHORT_TEXT"
               Type="C"
               Length="40"
            >Our diamonds are trillion cut.</Parameter>
            <Parameter
               Name="SORTED_BY"
               Type="C"
               Length="10"
            ></Parameter>
            <Parameter
               Name="PO_UNIT"
               Type="C"
               Length="3"
            ></Parameter>
         </Record>

_________________________


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

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.