[dsdl-comment] nvdl context element usage

From: Dave Pawson <dave.pawson@gmail.com>
Date: Wed May 14 2008 - 07:34:03 UTC

Trying the two files below: atom examples with nested XHTML.
I'm trying to work out how to use the context element.
1. nvdl-mode reports an error
Internal error in rng-validate-mode triggered at buffer position 406.
Invalid regexp: "Range striding over charsets"
Yet jing says the file is valid to the nvdl schema.
2. onvdl reports:
/files/nvdl/atom/atomXhtml2.nvdl:11:72: error: invalid name
which is the line containing the context element.

 <validate schema="atom.rng" useMode="xhtml">
      <context path="/a:feed/a:entry/a:content/x:div" useMode="xhtml"/>
    </validate>

I want to despatch to the xhtml schema when I meet a child of x:div

Any suggestions please?

Files below

TIA DaveP

XML source

<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:x="http://www.w3.org/1999/xhtml">
   <title>Dave Pawson's Blog. nodeSets</title>
   <author>
      <name>Dave Pawson</name>
      <uri>http://www.dpawson.co.uk/nodesets/atom.xml</uri>
   </author>
   <category term="nodesets" label="nodesets"/>
   <id>http://www.dpawson.co.uk/nodesets</id>
   <updated>2005-04-15T21:21:00.0Z</updated>
   <subtitle>Getting used to Atom </subtitle>
   <category term="nodesets"/>
   <link rel="self" href="http://www.dpawson.co.uk/nodesets/atom.xml"
         type="application/atom+xml"/>
   <entry xmlns:a="http://www.w3.org/2005/Atom"
xmlns:dc="http://purl.org/dc/elements/1.1/"
          xmlns:x="http://www.w3.org/1999/xhtml">
      <title>Did IBM get it right? </title>
      <published>2005-04-01T08:00:00Z</published>
      <id xml:lang="en-GB">http://www.dpawson.co.uk/nodesets/050401</id>
      <updated>2005-11-25T12:39:47.0Z</updated>
      <author>
         <name>Dave Pawson </name>
         <uri>http://www.dpawson.co.uk/nodesets</uri>
         <email>blog@dpawson.co.uk</email>
      </author>
      <category term="ibm" label="entry"/>
      <rights>(c) Dave Pawson 2005</rights>
      <summary>Did IBM get it right? </summary>
      <link rel="alternate"
href="http://www.dpawson.co.uk/nodesets/entries/050401.html"
            type="text/html"/>
      <content type="xhtml">
        <x:div>
              <x:p>P content</x:p>
        </x:div>

      </content>
   </entry>
</feed>

nvdl

<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"
xmlns:a="http://www.w3.org/2005/Atom" xmlns:x="http://www.w3.org/1999/xhtml"
startMode="doc"
>

<mode name="doc">
  <namespace ns="http://www.w3.org/2005/Atom">
    <validate schema="atom.rng" useMode="xhtml">
      <context path="/a:feed/a:entry/a:content/x:div" useMode="xhtml"/>
    </validate>
  </namespace>
</mode>

  <mode name="xhtml">
  <namespace ns="http://www.w3.org/1999/xhtml">
    <validate schema="xhtml.sbp.rng" />
  </namespace>
  </mode>
</rules>

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk
--
DSDL comments
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-comment-request@dsdl.org
(mailto:dsdl-comment-request@dsdl.org?Subject=unsubscribe)
Received on Wed May 14 09:34:08 2008

This archive was generated by hypermail 2.1.8 : Wed May 14 2008 - 08:03:05 UTC