OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: xi:include problem


davep <davep@dpawson.co.uk> writes:
> That's how, not what Mr Walsh!
> Herrumph.

Fair enough. Here's my everyday DocBook pipeline:

<p:declare-step version="1.0" name="main"
                xmlns:exf="http://exproc.org/standard/functions";
                xmlns:p="http://www.w3.org/ns/xproc";>
  <p:input port="source"/>
  <p:output port="result"/>
  <p:input port="parameters" kind="parameter"/>

  <!-- The style option specifies the stylesheet. The standard HTML one by default. -->
  <p:option name="style" select="'/projects/docbook/xslt20/xslt/base/html/docbook.xsl'"/>

  <!-- The schema option specifies the schema. The RDFaLite one by default. -->
  <p:option name="schema" select="'/projects/docbook/docbook/relaxng/schemas/dbrdfalite.rng'"/>

  <!-- Expand XIncludes -->
  <p:xinclude/>

  <!-- I've started using some ad-hoc shortcuts in my writing. For
       example, I write about XML so often that I use <att> instead
       of <tag class="attribute">. The ndw2db.xsl stylesheet
       normalizes my shortcut markup back into proper DocBook. -->
  <p:xslt name="normalize">
    <p:input port="stylesheet">
      <p:document href="/Users/ndw/stylesheets/ndw2db.xsl"/>
    </p:input>
  </p:xslt>

  <!-- Load the stylesheet and the schema. If I specify them as
       options, I want them resolved relative to the current working
       directory, not this stylesheet, so I have to work a little
       harder. -->
  <p:load name="style">
    <p:with-option name="href" select="resolve-uri($style, exf:cwd())"/>
  </p:load>

  <p:load name="schema">
    <p:with-option name="href" select="resolve-uri($schema, exf:cwd())"/>
  </p:load>

  <!-- Validate my (normlized) DocBook markup -->
  <p:validate-with-relax-ng>
    <p:input port="source">
      <p:pipe step="normalize" port="result"/>
    </p:input>
    <p:input port="schema">
      <p:pipe step="schema" port="result"/>
    </p:input>
  </p:validate-with-relax-ng>

  <!-- And...style it! -->
  <p:xslt>
    <p:input port="stylesheet">
      <p:pipe step="style" port="result"/>
    </p:input>
  </p:xslt>
</p:declare-step>

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | To the man who is afraid
http://www.oasis-open.org/docbook/ | everything rustles.-- Sophocles
Chair, DocBook Technical Committee |

Attachment: signature.asc
Description: PGP signature



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]