Hi Roger,
The interpretations:
> (R, validateR) (W, validateW) (D, validateD)
> (R, validateR) (W, attach) (D, validateD)
appears only when you have
<attach useMode="distance"/>
and in that case what happens is exactly what you expect:
> 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
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.
Best Regards,
George
-- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Costello, Roger L. wrote: > George, this is awesome! Thank you so much! > > I am very close to understanding, but there's one tiny piece that I'm > missing. > > In my example I have three sections: Diary, Work, and Distance. > > The Diary section specifies one action: validate against Diary.xsd > > The Work section specifies two actions: validate against Work.rdf and > attach > > The Distance section specifies one action: validate against > Distance.xsd > > For brevity, let me denote: > > R = the Diary section > W = the Work section > D = the Distance section > > validateR = validate against Diary.xsd > validateW = validate against Work.rdf > validateD = validate against Distance.xsd > > The mapping vectors (interpretations) created are: > > (R, validateR) (W, validateW) (D, validateD) > (R, validateR) (W, attach) (D, validateD) > > It appears to me that this is the set of validations that will occur: > > 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 > > But apparently that's not the case. What actually happens is: > > ValidateW will be applied on a fragment containing W and D > > Why is this? > > I understand why this would cause an error (Word.rdf doesn't permit a > <Distance> element), but I don't understand why ValidateW would be > applied to both W and D? If the Distance section had an attach action > then I could understand why ValidateW would be applied to both W and D. > > /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 Thu May 22 17:04:25 2008
This archive was generated by hypermail 2.1.8 : Thu May 22 2008 - 16:13:02 UTC