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

Re: PSVI issues

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Thu, 08 May 2008 14:44:13 +0100
To: "Innovimax SARL" <innovimax@gmail.com>
Cc: public-xml-processing-model-wg@w3.org
Message-ID: <f5bej8czz9u.fsf@hildegard.inf.ed.ac.uk>

Hash: SHA1

Mohamed writes:

> Can you give one or two use cases for psvi-available() ?

 <p:validate-with-xml-schema assert-valid="true">
  <p:input port="schemas">
     . . .
     <xs:element name="doomed" abstract="true" type="my:doomedType"/>
     . . .
     <xs:element name="purple" substitutionGroup="my:doomed"/>
     <xs:element name="mauve" substitutionGroup="my:doomed"/>
     <xs:element name="burgundy" substitutionGroup="my:doomed"/>
     . . .
  <p:when test="p:psvi-available()">
   <p:delete match="element(*,my:doomedType)"/>
    <p>This is risky, because if the schema is changed to add elts to
       or remove elts from the doomed subst. group,
       this step will need to be updated . . .</p>
   <p:delete match="my:purple|my:mauve|my:burgundy"/>

I.e., schema validate, and then use a type to do some work if it's
there, otherwise revert to an explicit list of elements.  As the
comment says, this will be robust wrt schema changes on the first
branch, but less so on the second. . .

- -- 
 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]
Version: GnuPG v1.2.6 (GNU/Linux)

Received on Thursday, 8 May 2008 13:44:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:46 UTC