Loading ...
Sorry, an error occurred while loading the content.

RE: [XSL-FO] Problem getting more than one

Expand Messages
  • Ryan Graham
    ... It is not clear what you are trying to accomplish. Looking at your code, I m assuming you want to return the case attribute from the entry parent node
    Message 1 of 3 , Oct 29, 2003
    • 0 Attachment
      >
      ><xsl:template match="*/sun[@status = 'hot']">
      > <fo:block>
      > <xsl:value-of select="./../../entry/@case"/>
      > </fo:block>
      >
      >
      >the problem
      >
      >the code will grab the first case= statement and any other attributes
      >but it wont grab the second case or the third case BUT it will grab
      >the seconds other attributes (ie test2, test3 but not
      >number2/number3)

      It is not clear what you are trying to accomplish. Looking at your code,
      I'm assuming you want to return the "case" attribute from the "entry" parent
      node of each "sun" node whose status='hot'.

      This will get you that (assuming "thisisthe" is the root node):

      <xsl:template match="/">
      <xsl:apply-templates select="//sun[@status = 'hot']"/>
      </xsl:template>

      <xsl:template match="sun">
      <xsl:for-each select=".">
      <fo:block>
      <xsl:value-of select="../@case" />
      </fo:block>
      </xsl:for-each>
      </xsl:template>

      But I can't imagine this is all you want to do.

      Can you provide more information about what you are trying to accomplish?

      -RG
    Your message has been successfully submitted and would be delivered to recipients shortly.