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

Re: [XSL-FO] Condition is not working

Expand Messages
  • G. Ken Holman
    ... The above test is checking to see if the parent s immediately preceding element has a child element with the name text1 . If you wanted to check to see
    Message 1 of 2 , Nov 27, 2003
      At 2003-11-27 06:19 +0000, sguy_chennai wrote:
      ><xsl:if test="not((../preceding-sibling::*[1][text1]) OR
      >(../preceding-sibling::*[1][text2]))">

      The above test is checking to see if the parent's immediately preceding
      element has a child element with the name "text1". If you wanted to check
      to see if the parent's immediately preceding element is a particular
      element with the name "text1", then the example I gave yesterday was:

      ../preceding-sibling::*[1][self::text1]

      >please suggest me and answer to my question

      When you only give a partial question and you make volunteers go and hunt
      down the context of your question, you are making it harder for people to
      help you.

      >() - grouping [] - predicate..
      >
      >please tell me when to use this and when to use both...i am very much
      >confused in condition...

      Grouping is used in a traditional sense for boolean and mathematical
      expressions. It is a convenience in node set expressions for the first
      step of a location path, but it has ramifications when addressing more than
      one node in the reverse document order because the act of grouping
      interprets the result set of nodes in document order.

      Predicates are filters on a given step and are interpreted in proximity
      order based on the axis you are using.

      These are basic principles in XPath 1.0.

      I hope this helps.

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

      --
      Next public European delivery: 3-day XSLT/2-day XSL-FO 2004-01-??
      Instructor-led on-site corporate, government & user group training
      for XSLT and XSL-FO world-wide: please contact us for the details

      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)
      ISBN 0-13-065196-6 Definitive XSLT and XPath
      ISBN 0-13-140374-5 Definitive XSL-FO
      ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath
      ISBN 1-894049-11-X Practical Formatting Using XSL-FO
      Member of the XML Guild of Practitioners: http://XMLGuild.info
      Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
    Your message has been successfully submitted and would be delivered to recipients shortly.