Re: NVDL?

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

Assuming it's just a matter of pass/fail, then an XProc implementation
of NVDL to handle the kind of example you offer is straightforward:

 <p:pipeline type="my:nvdl" xmlns:n="http://www.oxygenxml.com/nvdl"
name="nvdl">
 <p:viewport match="n:validate">
  <p:load name="loadSchema">
   <p:with-option name="href" select="@schema"/>
  </p:load>
  <p:choose>
   <p:xpath-context>
    <p:pipe step="nvdl" port="source"/>
   </p:xpath-context>
   <p:when test="string-ends(@href,'rng')">
    <p:documentation><p>Is this <em>really</em> how choice of
validator is done
in NVDL?  Otherwise I can't guess. . .</p></p:documentation>
    <p:validate-with-relax-ng>
     <p:input port="source">
      <p:pipe step="nvdl" port="source"/>
     </p:input>
     <p:input port="schema">
      <p:pipe step="loadSchema" port="result"/>
     </p:input>
    </p:validate-with-relax-ng>
   </p:when>
   <p:when test="string-ends(@href,'xsd')">
    <p:validate-with-xml-schema>
     <p:input port="source">
      <p:pipe step="nvdl" port="source"/>
     </p:input>
     <p:input port="schema">
      <p:pipe step="loadSchema" port="result"/>
     </p:input>
    </p:validate-with-xml-schema>
   </p:when>
  </p:choose>
 </p:viewport>
</p:pipeline>

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, 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)

iD8DBQFI2/dckjnJixAXWBoRAjKYAJ0VTApbS5gtxWRCQGa6S2GuQi6LqwCfQchy
nO9aKTo6SFmeGo4CijSLoxo=
=/B5X
-----END PGP SIGNATURE-----

Received on Thursday, 25 September 2008 20:41:44 UTC