> Our document is XML. We have a primary structure, which is made
> with just normal synchronous elements. Lets give it this structure.
>
> <!ELEMENT play ( title, line+)>
> <!ELEMENT title ( #PCDATA )>
> <!ELEMENT line ( #PCDATA | part-start | part-end )*>
> <!ELEMENT part-start EMPTY>
> <!ELEMENT part-end EMPTY>
> <!ATTLIST part-start
> character CDATA #REQUIRED>
>
> So the markup might look like
> ...
> <line><part-start character="FlowerPot">Weeed<part-end><part-start character="Ben">Hello</line
> <line>Ben<part-end><part-start character="narator">And there they all were</line>
> ...
The way I think I would address this sort of problem is to design a
language that can describe how the concurrent structures are represented
in the instance, e.g.
<concur>
<structure root="play">
<element name="line" start="line-start" end="line-end"/>
</structure>
<structure root="parts">
<element name="part" start="part-start" end="part-end"/>
</structure>
<atomic>
<element name="title"/>
</atomic>
</concur>
Using this description, you could then have a filter that makes one of
the secondary structures primary and makes the primary structure
secondary. In this case the filter would transform your example into:
<parts>
<title>....</title>
...
<start-line/>
<part character="FlowerPot">Weed</part>
<part character="Ben">Hello<end-line/><start-line/> Ben</part>
<part character="narrator">And there they all were<end-line/>
...
</parts>
You could run this output through the filter again to get the original
markup back.
For a document with N concurrent structures, you would have N schemas,
each of which is a schema (in any DSDL supported schema language) that
describes the structure when one particular structure is primary. You
would then be able to validate the document against all of these schemas
simultaneously by having N validations in parallel each of which
transforms the document so as to make one of the structures primary
before validating with the appropriate schema.
What sort of conventions would you want to use to represent the
secondary structures in the XML markup?
James
-- DSDL members discussion list To unsubscribe, please send a message with the command "unsubscribe" to dsdl-discuss-request@dsdl.org (mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)Received on Wed Jun 4 08:21:34 2003
This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:00:27 UTC