[dsdl-comment] Re: Section with a child section (whichis attachedto its parent), and the child section itself has a child section (which isnotattached to its parent)

From: George Cristian Bina <george@oxygenxml.com>
Date: Mon May 26 2008 - 09:17:00 UTC

Hi Dave,

Yes, that is about right. But think in sections, not elements. When you
use useMode="something" the mode us changed when processing the child
sections of the current section, but if triggers are used a child
section can be in the same namespace as the current section.

I believe jnvdl uses XSLT to obtain the script with all the default
rules applied.

Best Regards,
George

-- 
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Dave Pawson wrote:
> Hi again George.
> Moving on to your second example.
> 
> 
> In one part of it you have
> 
>     <mode name="B">
>         <namespace ns="http://B">
>             <!-- Validates the section in the second namespace against
> the second schema.
>                 Further content in other namespaces is processed with
> the allow mode that
>                 just allows anything so the validation is striclty
> applied to the current section.
>             -->
>             <validate schema="b.rng" useMode="allow"/>
>             <!-- The second action contributes to the validation
> candidate of the parent
>                 validate action, the one started in the initial mode,
> the validate against the
>                 first schema. This says ignore this section in the b
> namespace and process
>                 further sections using the mode attachA.
>             -->
>             <unwrap useMode="attachA"/>
>         </namespace>
>     </mode>
> 
> I'm trying to find a way of 'reading' these scripts.
> I want to liken them to templates in xslt since they are declarative
> (to some extent).
> 
> Can I read this mode as:
> If you find content in the current context in ns B, validate it using B.rng
> then (sequentially), when you find something *not* in ns B, change
> mode to the 'allow' mode.
> 
> then start again in this mode (fork the process? or am I ignoring the
> conversion to the simple syntax?)
> ignore content in the B namespace (do nothing == no validate action)
> then change mode to the 'attachA' mode.
> 
> It may not be 100% exact, but is my 'model' about right from the user
> view please?
> 
> 
> 
> Would it help if I could see the transformed script (in the simple
> syntax)? Is this a job
> for XSLT or is it too complex?
> 
> Regards
> 
> 
> 
> 
--
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 Mon May 26 11:16:57 2008

This archive was generated by hypermail 2.1.8 : Mon May 26 2008 - 12:38:07 UTC