Yes.
The processing is driven by an implicit apply-rules mechanism, similar
with the apply-templates from XSLT that triggers the processing of child
sections. Each action acts on the current section and applies the rules
further on the child sections.
Note that the validate action acts also on descendant sections, the ones
on which an attach action is executed.
The allow and reject are just special cases for validate, allow is
equivalent with a validate using a schema that accepts anything and
reject is equivalent with validate with a schema that rejects
everything. So NVDL is mainly reduced to 3 main actions
validate
attach
unwrap
Well, there is also an attachPlaceholder action, but that just puts some
element in instead of the current section. I do not know the exact
intent of this, but my guess is that it is just for performance reasons,
if you have a schema that says here we allow anything from other
namespaces then instead of passing through all that content using an
attach action you can just use attachPlaceholder and pass only one element.
The validate action triggers a validation on a document fragment that
starts with the current section and is formed by descendant sections
that have an attach action acting on them. The unwrap action is used to
ignore the current section and continue the processing on the child
sections.
Best Regards,
George
-- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Costello, Roger L. wrote: > Thank you once again George. You have been extraordinarily helpful and > generous with your time. I appreciate it very much. > > I think that I now understand! (thanks to your help!) > > Here's the processing model of NVDL: > > ------------------------------------------- > Start of NVDL Processing Model Explanation > ------------------------------------------- > 1. A section is identified by a namespace, e.g. > > <namespace ns="http://www.work.org"> > ... > </namespace> > > > 2. A section is acted on by specifying one or more actions: > > <namespace ns="http://www.work.org"> > Action1 > Action2 > ... > </namespace> > > For example, this rule specifies two actions - validate and attach - on > the Work section: > > <namespace ns="http://www.work.org"> > <validate schema="Work.rng" > useMode="distance"/> > <attach useMode="allow"/> > </namespace> > > > 3. Each action is executed using the current section, and then the > child sections are processed, e.g. > > This action: > > <validate schema="Work.rng" > useMode="distance"/> > > specifies, "Validate the current section against Work.rng, and then > process the child section(s) using the mode whose name is distance." > > This action: > > <attach useMode="allow"/> > > specifies, "Attach the current section to the parent section, and then > process the child section(s) using the mode whose name is allow." > ------------------------------------------- > End of NVDL Processing Model Explanation > ------------------------------------------- > > > The reason my original NVDL: > > <mode name="activity"> > <namespace ns="http://www.work.org"> > <validate schema="Work.rng" > useMode="distance"/> > <attach /> > </namespace> > </mode> > > failed is now easily understood: > > This action: > > <attach /> > > says, "Attach the current section to the parent section, and then > process the child section (Distance). Since no rule is specified for > processing the Distance child segment, the default rule is used. The > default rule is this: > > <anyNamespace> > <reject/> > </anyNamespace> > > Thus the Distance child section is rejected with an error. > > That's it! > > Is my understanding correct? > > /Roger > > -- > 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=subscribe) > -- 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 Fri May 23 14:41:16 2008
This archive was generated by hypermail 2.1.8 : Fri May 23 2008 - 15:23:02 UTC