Nulls in ADO recordset How to handle them??

admin

Administrator
Staff member
Below is part of some v3 XSL code I have to translate an ADO Record Set into a HTML Table. The code below is designed to handle the problem with nullfields being left out of the XML node tree. What I'm doing is to loopthrough all the fields in the schema and request the corresponding data fromthe z:row collection by field name.If I enter<TD> <xsl:value-of select=$ThisRow/@Supplier /> </TD>Where "Supplier" is one of the fields in the record set, I get the valueforthat field.But... When I use something like.<TD> <xsl:value-of select="$ThisRow/@'@Name'" /> </TD>Or<TD> <xsl:value-of select="$ThisRow[@Name]" /> </TD>Where @Name is the name of the field from the schema I get nothing.Help!!! Please I've been at this for 3 days and I'm not getting any where.How do I reference an attribute in one node given the name from an other?Thanks Jim******************************************************************************************************<!-- Prints the rows out --><xsl:template match="//z:row"><TR><!-- get a collection of all the fields in the record set --><xsl:variable name="ThisRow" select="." /><!-- Loop through all the fields in the schema --><xsl:for-each select="//s:AttributeType"><!-- Get the data for the specific field --><TD> <xsl:value-of select="$ThisRow/@'@Name'" /> </TD></xsl:for-each></TR>
 
Back
Top