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

7314Re: [XSL-FO] Problem with Dictionary Style Running Heads

Expand Messages
  • G. Ken Holman
    Feb 1, 2007
      At 2007-02-01 17:02 +0800, Jeff Sese wrote:
      >Ken, I haven't tried your code yet but i think if i have a page like this:

      Well, I don't have the time to make *more* test data for your
      requirements, so if you haven't tried the code I took the time to
      suggest then I won't bother trying it either.

      >I tried this and i got the desired output,

      Then why did you post in your first message that you had a problem?

      >but i can seem to understand how it happened.

      I do not see why you have added complexity in your code.

      ><xsl:variable name="first" as="xs:string">
      > <fo:retrieve-marker retrieve-class-name="header"
      >retrieve-boundary="page" retrieve-position="first-including-carryover"/>
      ></xsl:variable>
      ><xsl:variable name="last" as="xs:string">
      > <fo:retrieve-marker retrieve-class-name="header"
      >retrieve-boundary="page" retrieve-position="last-starting-within-page"/>
      ></xsl:variable>
      ><fo:block>
      > <xsl:choose>
      > <xsl:when test="$first eq $last">

      You have bound two specified sequence constructors to variables as
      strings and then compared them. Each string is empty. They will
      always return the same result and will be considered equal. How did
      you think they were going to vary?

      >I tried outputting the content of the variable using xsl:message but i
      >get no output for their value:
      ><xsl:message>
      > <xsl:copy-of select="$first"/>
      > <xsl:copy-of select="$last"/>
      ></xsl:message>

      Both variables are cast as strings and they are both empty, hence you
      get their empty value.

      >Is my xslt above correct?

      "correct" for what purpose? It does seem nonsensical to cast empty
      string values and then compare them.

      >It does give me the desired output though...

      Well, I cannot see how, since your comparison of two empty strings
      will always produce a "true" and you won't see the dash. But since
      you are seeing the dash, then I don't understand where you got your
      snippet, or some other information is missing.

      Remember that the XSL-FO process is arms-length from the XSLT
      process. There is no feedback loop. There is *nothing* you can test
      in your XSLT that is the result of any condition of formatting in your XSL-FO.

      . . . . . . . . . . . . . Ken

      --
      World-wide corporate, govt. & user group XML, XSL and UBL training
      RSS feeds: publicly-available developer resources and training
      G. Ken Holman mailto:gkholman@...
      Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
      Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
      Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/f/bc
      Legal business disclaimers: http://www.CraneSoftwrights.com/legal
    • Show all 7 messages in this topic