xsl-list
[Top] [All Lists]

Re: [xsl] Newbie cannot find syntax error in attribute select

2011-02-15 21:23:05
On Wed, Feb 16, 2011 at 03:14:14AM +0000, thehulk(_at_)comcast(_dot_)net 
scripsit:
[snip[
My (bad) template is:

<xsl:template match="Account_or_Subaccount">
  <xsl:element name="Contract">
    <xsl:attribute name="Sub_ID">
      <xsl:value-of select="./Subscriber_Info@Sub_Id" />
    </xsl:attribute>
    <xsl:attribute name="Org_ID">
      <xsl:value-of 
select="./Characteristic[@Display_Lable=&quot;Organization ID&quot;]" />
    </xsl:attribute>
  </xsl:element>
</xsl:template>

It's ./Subscriber_Info/@Sub_Id if you're trying to match the Sub_Id attribute
associated with the Subscriber_Info element child of the context node.
You need the slash to separate all the nodes in a path match, and
attributes are nodes.

-- Graydon

--~------------------------------------------------------------------
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>
--~--