views:

30

answers:

1
<field type="math" size="12"  unitText="%" unitPos="back"/>

I am able to select "type" and "12" from their respective fields but I cannot do the same for unitText and unitPos. Any ideas why?

Below is what I'm using to print type and size.

<xsl:value-of select="@size"/>

I am entering the "field" tag with this line

<xsl:template match="field" mode="all">

Thanks for any assistance. Been banging my head against the wall for awhile. :P

A: 

I can't reproduce the problem. This stylesheet:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
    <xsl:output method="text"/>
    <xsl:template match="field">
        <xsl:apply-templates select="@*"/>
    </xsl:template>
    <xsl:template match="@*">
        <xsl:value-of select="concat(name(),': ',.,'&#xA;')"/>
    </xsl:template>
</xsl:stylesheet>

With input:

<field type="math" size="12"  unitText="%" unitPos="back"/>

Output:

type: math
size: 12
unitText: %
unitPos: back
Alejandro
Turns out it's not case sensitive comparisons. :(
bobber205
@bobber205: Yes, that is basic in XML, whether you are dealing with XPath, CSS or Emacscript
Alejandro