MNS

MNS

[2]

Suppose we want to validate an XHTML document that uses RDF within its head element. The following would do the job:

<rules xmlns="http://www.thaiopensource.com/ns/mns" startMode="xhtml">
  <validate ns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
            schema="rdfxml.rng"
            inModes="rdf"
            useMode="anything"/>
  <validate ns="http://www.w3.org/1999/xhtml"
            schema="xhtml.rng"
            inModes="xhtml"
            prune="elements">
    <context useMode="rdf">
      <element name="head"/>
    </context>
  </validate>
  <lax inModes="anything"/>
</rules>

(名無しさん [sage])