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

Numbering in cross references

Expand Messages
  • Carolyn
    In my document there are tables with titles and those without. To get the table numbering to work correctly I had to use the following:
    Message 1 of 4 , Aug 11 1:55 PM
    • 0 Attachment
      In my document there are tables with titles and those without. To
      get the table numbering to work correctly I had to use the following:

      <xsl:number count="table//title" level="any" from="manual"
      format="1. "/>

      which works perfectly in the table titles.

      However when I try to cross reference to the table
      number it only returns the text "Table" -- no number when using the
      following:

      <xsl:for-each select="key('tableids',@refid)">
      <xsl:text>Table </xsl:text>
      <xsl:number count="table//title" from="manual" level="single"/>
      </xsl:for-each>

      If I replace the "table//title" with "title" in the count attribute
      the number shows up in the cross reference but not the correct
      number because of tables without titles.

      Any thoughts?
    • J.Pietschmann
      Carolyn wrote: Pure XSLT questions are best asked on the Mulberry XSL list: http://www.mulberrytech.com/xsl/xsl-list/ ... ^^^ ... ^^^^^^ Without drilling
      Message 2 of 4 , Aug 11 2:23 PM
      • 0 Attachment
        Carolyn wrote:

        Pure XSLT questions are best asked on the Mulberry XSL list:
        http://www.mulberrytech.com/xsl/xsl-list/

        As for the question:
        > In my document there are tables with titles and those without. To
        > get the table numbering to work correctly I had to use the following:
        >
        > <xsl:number count="table//title" level="any" from="manual"
        ^^^
        ...
        > However when I try to cross reference
        ...
        > <xsl:number count="table//title" from="manual" level="single"/>
        ^^^^^^

        Without drilling deeper: does using consistent level attributes
        solve the problem?

        J.Pietschmann
      • Carolyn
        ... I noticed that after I posted this message, but no it does not. Thank you anyway
        Message 3 of 4 , Aug 12 5:41 AM
        • 0 Attachment
          >
          > Without drilling deeper: does using consistent level attributes
          > solve the problem?
          >
          > J.Pietschmann

          I noticed that after I posted this message, but no it does not. Thank
          you anyway
        • J.Pietschmann
          ... I suspect the problem is the context node in the code generating the cross reference. It would be difficult to track this down without a more complete
          Message 4 of 4 , Aug 12 1:06 PM
          • 0 Attachment
            Carolyn wrote:
            > I noticed that after I posted this message, but no it does not. Thank
            > you anyway

            I suspect the problem is the context node in the code generating
            the cross reference. It would be difficult to track this down
            without a more complete stlze sheet and matching XML input.

            Common advise at this point: create a minimal style sheet and
            corresponding input by deleting as much unnecessary content
            and style sheet code as possible while still keeping the faulty
            behaviour. More often then not the problem cause reveals itself
            during the process.


            J.Pietschmann
          Your message has been successfully submitted and would be delivered to recipients shortly.