NVDL and nested fragments

Post here issues about NVDL, not specifically linked to the oNVDL implementation.
Posts: 123
Location: Victoria, BC, Canada

NVDL and nested fragments

Fri Aug 28, 2015 1:28 am

IN a couple of projects, I'm producing documents with content from multiple namespaces, usually as part of a larger processing chain. For instance, I might have a TEI document which inside its body element contains an XHTML table:

Code: Select all

I'd like to use NVDL to validate these sorts of document, and I can see how to set up validation for the TEI namespace and the NVDL namespace; what I can't figure out (maybe it's impossible) is how to tell the validation action for the XHTML namespace that the root element for the purposes of validation should be <xhtml:table>, not <xhtml:html>, which is what the XHTML schema expects. What I'd like to do is validate the table and its descendants according to the XHTML schema, but on the basis that it's a fragment and not a complete document, so its root element is not <xhtml:html>.

Is this feasible with NVDL? If so, how can it be done?
Posts: 6055

Re: NVDL and nested fragments

Fri Aug 28, 2015 3:56 pm

Hi Martin,

I found a similar question here (along with workaround posted by George Bina):


Maybe another workaround would be to use an XML Schema to validate the XHTML parts, for example the one at:


which is already mapped through our XML catalogs to a local copy.

Radu Coravu
<oXygen/> XML Editor
Posts: 123
Location: Victoria, BC, Canada

Re: NVDL and nested fragments

Fri Aug 28, 2015 11:38 pm

Thanks Radu, that's helpful. I'll need a portable solution (some of this validation happens on a server without Oxygen), so I think I might have to follow George's suggested workaround.

This seems a fairly severe limitation of NVDL. Surely it's more common to embed fragmentary content from another namespace rather than complete documents, in most use-cases.

Site Admin
Posts: 2100

Re: NVDL and nested fragments

Sun Aug 30, 2015 11:59 pm

Hi Martin,

In this case the problem is not NVDL but the schema for XHTML - it was constructed to allow only html as root element.
Alternatively, you may consider using XProc, that will allow you to wrap the XHTML fragment in the missing elements and then trigger the validation step.

Best Regards,
George Cristian Bina

Return to “General NVDL Issues”

Who is online

Users browsing this forum: No registered users and 0 guests