Am I wrong in thinking that you are all talking about the *implementation* !
Isn't the declaration of ID simple enough to let the implemter do what
he has to do ?
something like
<declare-id context="simple_xpath | simple_xpath"/>
<declare-idref context="simple_xpath | simple_xpath"/>
isn't just sufficient ?
We could start by augmenting the simple XPath
I say
Simple XPath could be as simple as
foo/@id
or
bar
without predicate
Now let's try to make it grow enough to say "simple" and "streamable"
Mohamed
PS : note that i'm talking about IDness and not KEYness, and I hope
that it is sufficient, since IDness has the big disandvantage of
beeing global
On Mon, May 12, 2008 at 10:44 AM, Rick Jelliffe
<rjelliffe@allette.com.au> wrote:
> IDness has three constraints
>
> 1) It is an NCName
> 2) There are not two ID attributes in the same element
> 3) The ID value is document-unique.
>
> IDREFness has two constraints
> 1) It is an NCName
> 2) There is a corresponding ID attribute.
>
> Schematron has a difficulty with this this *formulation* of the definition, because of the circularity of the definition of 2) for IDness. It is based allocating a type definition to nodes (ID) and being able to retrieve this statically or dynamically.
>
> In Schematron the way to formulat this is by saying that IDness is a pattern, true of the whole document, *not* some kind of magic property of the attribute or element. The following is a simple example in (rough, probably wrong) XPath2:
>
> <pattern id="ids">
> <title>IDs</title>
> <let name="theIDnodes" value="/bar/baz/@id | ...." />
>
> <rule context="/bar/baz/@ID" role="ID">
> <assert test="xs:NCName(.)">
> 1) An ID attribute should be an XML non-colonized name.
> </assert>
>
> <assert test="count(unique($theIDnodes/..))">
> 2) No element should have more than a single ID attribute.
> </assert>
>
> <assert test="count($theIDnodes = .) = 1">
> 3) There should be no ID attributes with duplicate values.
> </assert>
> </rule>
>
> ...
> </pattern>
>
> Cheers
> Rick
>
>
>
>
> MURATA Makoto wrote:
>
> > Let's make sure whether Schematron does the job.
> > Consider the following schema. It is correct (as defined by the RNG
> > spec) but not compatible (as defined by the DTD compatibility spec).
> >
> > start = element foo {bar1, bar2, ttt*}
> > bar1 = element bar1 {baz1}
> > bar2 = element bar2 {baz2}
> > baz1 = element baz {attribute id { ID }, xsd:string}
> > baz2 = element baz {xsd:int}
> > ttt = element ttt {attribute ref { IDREF } }
> >
> > In Schematron, how can we say the following conditions?
> >
> > 1) bar/baz/@id are identifiers
> > 2) ttt/@ref references to the identifiers
> >
> > Application programmers can easily write programs for maintaining
> > hath tables if they understand 1) and 2).
> > If Schematron can meet the challenge, I am not sure if we need something more.
> >
> > Cheers,
> >
> >
> >
>
> --
>
>
>
> 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)
>
>
-- Innovimax SARL Consulting, Training & XML Development 9, impasse des Orteaux 75020 Paris Tel : +33 9 52 475787 Fax : +33 1 4356 1746 http://www.innovimax.fr RCS Paris 488.018.631 SARL au capital de 10.000 € -- 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 Mon May 12 10:57:29 2008
This archive was generated by hypermail 2.1.8 : Thu May 29 2008 - 08:13:04 UTC