[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: Dave Pawson <dave.pawson@gmail.com>
Date: Sat May 24 2008 - 15:29:22 UTC

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

-- 
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 Sat May 24 17:29:25 2008

This archive was generated by hypermail 2.1.8 : Mon May 26 2008 - 09:23:06 UTC