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

RE: [XSL-FO] Controlled Failing of a PDF

Expand Messages
  • Nicola Harlow
    Thanks, that s excellent :) Nicola Nicola Harlow Technical Author The Program Management Group plc tel: +44 (0) 1937 547 171 direct: +44 (0)
    Message 1 of 3 , Apr 11, 2005
      Thanks, that's excellent :)



      Nicola



      Nicola Harlow
      Technical Author
      The Program Management Group plc
      tel: +44 (0) 1937 547 171
      direct: +44 (0) 1937 547 165
      fax: +44 (0) 1937 547 154
      mail: nicola.harlow@...
      web: http://www.pm-group.com

      ________________________________

      From: Bob Stayton [mailto:bobs@...]
      Sent: 08 April 2005 19:34
      To: XSL-FO@yahoogroups.com
      Subject: Re: [XSL-FO] Controlled Failing of a PDF



      This template should do it:

      <xsl:template match="toc_book">
      <xsl:message terminate="yes">The toc_book element is not permitted.
      Exiting. </xsl:message>
      </xsl:template>

      The terminate="yes" attribute should kill the processing.

      Bob Stayton
      Sagehill Enterprises
      DocBook Consulting
      bobs@...


      ----- Original Message -----
      From: "Nicola Harlow" <nicola.harlow@...>
      To: <XSL-FO@yahoogroups.com>
      Sent: Friday, April 08, 2005 2:21 AM
      Subject: [XSL-FO] Controlled Failing of a PDF


      >
      > Hi,
      >
      >
      >
      > Is there any way to fail a transformation if the XML contains a
      certain
      > tag?
      >
      >
      >
      > I know you can not have it in the DTD and it would scream at you, but
      I
      > have a single DTD that supports 3 formats.
      >
      >
      >
      > I'm creating PDF, CHM and plain HMTL output from the same XML. The
      > problem is that the PDF can't use some of the CHM tags.
      >
      > I've created an XSL to process the XML into a PDF compatible xml
      output,
      > which means you have to process the XML twice. Not perfect, but seems
      it
      > is the only way to do it without interrupting the flow.
      >
      >
      >
      > I basically want the XSL to fail if it detects the tag <toc_book> in
      the
      > XML and not create the PDF, so the user knows they've screwed up and
      > need to go back and process the XML properly. At the moment it just
      > creates the PDF anyway.
      >
      >
      >
      > Is this possible?
      >
      >
      >
      > Sorry if this makes no sense!
      >
      >
      >
      > Nicola
      >
      >
      >
      > Nicola Harlow
      > Technical Author
      > The Program Management Group plc
      > tel: +44 (0) 1937 547 171
      > direct: +44 (0) 1937 547 165
      > fax: +44 (0) 1937 547 154
      > mail: nicola.harlow@...
      > web: http://www.pm-group.com
      >
      >
      >
      >
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >
      >





      ________________________________

      Yahoo! Groups Links

      * To visit your group on the web, go to:
      http://groups.yahoo.com/group/XSL-FO/

      * To unsubscribe from this group, send an email to:
      XSL-FO-unsubscribe@yahoogroups.com
      <mailto:XSL-FO-unsubscribe@yahoogroups.com?subject=Unsubscribe>

      * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      Service <http://docs.yahoo.com/info/terms/> .



      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.