W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > March 2006

HST's take on Richard Tobin's conditional proposal

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Thu, 16 Mar 2006 17:01:06 +0000
To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>
Message-ID: <f5by7zaqq7h.fsf@erasmus.inf.ed.ac.uk>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wrt the discussion just now about conditionals, here's a pair of
pseudo-pipeline-documents which condition processing on a property of
the input (1) or of a computed stylesheet (2).  The 'otherwise'
branches aren't filled in, as we didn't discuss them. . .

1)
<pipe>
 <subpipe input="foo.xsl" output="#computedStyle">
  <step operation="XSLT 2.0" stylesheet="baz.xsl"/>
  <step operation="xxx" arg="yyy.xml"/>
 </subpipe>
 <subpipe input="#STDIN" output="#primary">
  <step operation="qqq" arg="rrr.xml"/>
 </subpipe>
 <subpipe input="#primary" output="#STDOUT">
  <choose>
   <when test="/doc/author/initials='ndw'">
    <subpipe input="#primary">
     <step operation="XSLT 2.0" stylesheet="#computedStyle"/>
    </subpipe>
   </when>
   <otherwise>
    ???
   </otherwise>
  </choose>
 </subpipe>
</pipe>

2)
<pipe>
 <subpipe input="foo.xsl" output="#computedStyle">
  <step operation="XSLT 2.0" stylesheet="baz.xsl"/>
  <step operation="xxx" arg="yyy.xml"/>
 </subpipe>
 <subpipe input="#STDIN" output="#primary">
  <step operation="qqq" arg="rrr.xml"/>
 </subpipe>
 <subpipe input="#computedStyle" output="#STDOUT">
  <choose>
   <when test="/xsl:stylesheet//fo:*">
    <subpipe input="#primary">
     <step operation="XSLT 2.0" stylesheet="#computedStyle"/>
    </subpipe>
   </when>
   <otherwise>
    ???
   </otherwise>
  </choose>
 </subpipe>
</pipe>

ht
- -- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFEGZnSkjnJixAXWBoRAu49AJ9I4qneX/vcxUFhg/SiLjZkhpNejQCfW6FK
EhXmWyZGmxNBa4QwOkvBPzk=
=HfPN
-----END PGP SIGNATURE-----
Received on Thursday, 16 March 2006 17:01:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:47 GMT