Sigh. I do feel silly.
I clearly do not understand the basic processing model.
2008/5/22 George Cristian Bina <george@oxygenxml.com>:
> In your initial example you had
> <attach/>
> which is equivalent with
> <attach useMode="activity"/>
> because if there is no useMode specified the current mode will be used.
> That means the interpretations will be:
>
> (R, validateR) (W, validateW) (D, validateD)
> (R, validateR) (W, attach) (D, reject)
>
> and what happens is
>
> ValidateR will be applied on a fragment containing R and W
> ValidateW will be applied on a fragment containing W
> ValidateD will be applied on a fragment containing D
> reject will be applied on a fragment contaning D
>
> So, the error message was not from the ValidateW action but from the reject
> action.
>
> If a mode does not have a rule on anyNamespace then the default action will
> be reject and when the D section is processed in the second interpretation
> against the activity mode, none of the activity mode rules matches so the
> reject action will be taken, resulting the (D, reject) pair from the second
> interpretation.
Taking a more general approach then:
If I have
<a xmlns='a'>
<b xmlns='b'/>
</a>
Is it possible to define a schema that only has element a,
another schema that has element b
and have a mode in my nvdl script which validates 'a' against schema 'a',
*but does not allow element b* (i.e. takes the default reject action).
I'd like to then change modes such that I can validate b against schema b.
I.e. I'm trying to avoid the "process the rest of the child elements
of 'a' against the anything content model"
approach, by changing modes as soon as an element not in the 'a' namespace is
met.
I want to write a schema for 'a' which has no knowledge of 'b'
namespaced elements.
Then to write a schema for 'b' which is complete.
((I know I am ignoring the problem of *where* in the 'a' schema the 'b' model
can occur, but I am trying to understand more of the processing model, and I
keep forgetting the defaults!))
TIA
-- 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 Thu May 22 18:08:40 2008
This archive was generated by hypermail 2.1.8 : Fri May 23 2008 - 06:13:05 UTC