[dsdl-discuss] Fw: Non-Normative Annex to Part 5 - NVDL

From: Martin Bryan <martin@is-thought.co.uk>
Date: Mon Sep 25 2006 - 18:37:11 UTC

Thought you guys might like to see the impact RELAX NG and NVDL are having
on OOXML

Martin

> ________________________________________
> From: Jean Paoli
> Sent: Saturday, September 23, 2006 1:53 PM
> To: Patrick Charollais
> Cc: e-TC45@ecma-international.org
> Subject: Non-Normative Annex to Part 5 - NVDL
>
> Patrick: can you please make this an official TC45 document called:
> Non-Normative Annex to Part 5 - NVDL
>
> The NVDL standard can be found at
> http://www.jtc1sc34.org/repository/0586.pdf
>
>
> All: as discussed in our TC conf call on thursday, this is what Murata
> Makoto from SC34 Japan has prepared as an informative annex to Part 5.
> Murata san beleive that this will complement Part 5 but decribing in NVDL
> (an ISO standard) the rules for backward compatibility as decribed in Part
5
> "Markup Compatibility" as defined in our public Draft 1.4..
>
> Murata san is one of the key creators of NVDL and is happy to respond to
any
> question regarding this work so lets discuss this in our face 2 face.
>
> PS: Also as discussed in our conf call, Rick Jellife indicated that he
will
> send the final RelaxNG translations of our XSD schemas on monday 1 day
> before our face 2 face and I will send them to the TC.
>
>
> --------------------------------------------------------------------------

--
> ---------------
> First, in the Bibliography, add
>
> ISO/IEC 197575-4, Information technology -- Document Schema Definition
> Languages (DSDL) --
> Part 4: Namespace-based Validation Dispatching Language(NVDL).
>
>
>
> Second, add Appendix A (ISO/IEC uses appendixes rather than annexes).
> The existing Annex A should become Appendix B.
>
>
>
> Appendix A (non-normative): Validation by NVDL
>
> Namespace-based Validation Dispatching Language (NVDL) allows
> documents to be decomposed into validation candidates, each of which
> may be validated independently.
>
> NVDL may be used for validation against requirements of this part.  It
> may also be used for validation against the combination of Office Open
> XML (including this part) and some extension.
>
> A.1 Validation against requirements of this part
>
> An XML document may satisfy requirements of this part without being an
> OOXML document.  The following NVDL script examines whether a given
> document correctly uses the attributes and elements of this part.
>
> This NVDL script first extracts elements and attributes in the the
> Markup Compatibility namespace, and then validate them against RELAX
> NG schemas.  Note that AlternateContent elements are not allowed to
> have foreign elements, but Choice and Fallback elements are.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0">
>   <namespace match="attributes"
> ns="http://schemas.openxmlformats.org/markup-compatibility/2006">
>     <validate schemaType="application/relax-ng-compact-syntax">
>       <schema>
> namespace mc =
>    "http://schemas.openxmlformats.org/markup-compatibility/2006"
> nsList = list { xsd:NCName* }
> qnameList = list { (xsd:QName | xsd:string {pattern = "\i\c*:\*" })*}
> start = element * {
>    attribute mc:Ignorable { nsList }?,
>    attribute mc:ProcessContent { qnameList }?,
>    attribute mc:PreserveElements { qnameList }?,
>    attribute mc:PreserveAttributes { qnameList }?,
>    attribute mc:MustUnderstand { nsList }?
> }
>       </schema>
>     </validate>
>   </namespace>
>   <namespace match="elements"
> ns="http://schemas.openxmlformats.org/markup-compatibility/2006">
>     <validate schemaType="application/relax-ng-compact-syntax">
>       <schema>
> default namespace =
>    "http://schemas.openxmlformats.org/markup-compatibility/2006"
> nsList = list { xsd:NCName* }
> qnameList = list { (xsd:QName | xsd:string {pattern = "\i\c*:\*" })*}
> start = element AlternateContent {choice+,fallback?}
> choice = element Choice {attribute Requires { nsList }, text}
> fallback = element Fallback {text}
>       </schema>
>     </validate>
>   </namespace>
>   <anyNamespace match="elements attributes">
>     <allow/>
>   </anyNamespace>
> </rules>
>
>
> The two RELAX NG sub-schemas in the above NVDL script are called
> the OOXML Markup Compatibility schemas.
>
> Note: The OOXML Markup Compatibility schemas may be rewritten by W3C
> XML Schema.
>
>
>
>
> A.2 Validation against the combination of Office Open XML (including
>     this part) and some extension.
>
> An extension of Office Open XML via this part may be captured by an
> NVDL script that invokes the Office Open XML schema and schemas for
> the extension.
>
> The following schema allows two extensions.  They have the namespaces
> http://www.example.com/myExtensionWithFallback and
> http://www.example.com/myExtensionWithoutFallback.  The first extension
> is accompanied with a parent AlternateContent element and a sibling
> Fallback element, while the second one may appear anywhere in the document
> without AlternateContent or Fallback elements.
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"
> startMode="top">
>     <mode name="top">
>         <namespace
> ns="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
>             <validate schema="wml.xsd" useMode="nested"/>
>         </namespace>
>     </mode>
>     <mode name="nested">
>         <namespace match="attributes elements"
>             ns="http://schemas.openxmlformats.org/*">
>             <attach/>
>         </namespace>
>         <namespace match="attributes elements"
>             ns="urn:schemas-microsoft-com:*">
>             <attach/>
>         </namespace>
>         <namespace match="attributes"
>
> ns="http://schemas.openxmlformats.org/markup-compatibility/2006">
>             <validate schemaType="application/relax-ng-compact-syntax">
>                 <schema>
> namespace mc =
>    "http://schemas.openxmlformats.org/markup-compatibility/2006"
> nsList = list { xsd:NCName* }
> qnameList = list { (xsd:QName | xsd:string {pattern = "\i\c*:\*" })*}
> start = element * {
>    attribute mc:Ignorable { nsList }?,
>    attribute mc:ProcessContent { qnameList }?,
>    attribute mc:PreserveElements { qnameList }?,
>    attribute mc:PreserveAttributes { qnameList }?,
>    attribute mc:MustUnderstand { nsList }?
> }
>                 </schema>
>             </validate>
>         </namespace>
>         <namespace match="elements"
> ns="http://schemas.openxmlformats.org/markup-compatibility/2006">
>             <validate schemaType="application/relax-ng-compact-syntax">
>                 <schema>
> default namespace =
>    "http://schemas.openxmlformats.org/markup-compatibility/2006"
> nsList = list { xsd:NCName* }
> qnameList = list { (xsd:QName | xsd:string {pattern = "\i\c*:\*" })*}
> start = element AlternateContent {choice,fallback}
> choice = element Choice {attribute Requires { nsList }, text}
> fallback = element Fallback {text}
>                 </schema>
>                 <context path="Choice">
>                     <mode>
>                         <namespace
> ns="http://www.example.com/myExtenstionWithFallback">
>                             <validate
schema="myExtensionWithFallback.rng">
>                                 <mode>
>                                     <anyNamespace>
>                                         <attach/>
>                                     </anyNamespace>
>                                 </mode>
>                             </validate>
>                         </namespace>
>                     </mode>
>                 </context>
>             </validate>
>             <unwrap>
>                 <context path="Fallback">
>                     <mode>
>                         <anyNamespace>
>                             <attach/>
>                         </anyNamespace>
>                     </mode>
>                 </context>
>             </unwrap>
>         </namespace>
>         <namespace ns="http://www.example.com/myExtensionWithoutFallback">
>             <validate schema="myExtensionWithoutFallback.rng">
>                 <mode>
>                     <anyNamespace>
>                         <attach/>
>                     </anyNamespace>
>                 </mode>
>             </validate>
>         </namespace>
>     </mode>
> </rules>
>
>
> --
> MURATA Makoto (FAMILY Given) <EB2M-MRT@asahi-net.or.jp>
>
>
>
>
--
DSDL members discussion list
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-discuss-request@dsdl.org
(mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
Received on Mon Sep 25 20:38:44 2006

This archive was generated by hypermail 2.1.8 : Mon Sep 25 2006 - 18:43:01 UTC