Kudos to George Bina, who actually simply asked James Clark and
Makoto Murata about the "Conflicting ID-types" problem.
All we need to do is change the definition of the anyXML pattern so
that an @xml:id that it matches that is already defined is declared
as ID, not text! Gads, why didn't I think of that?
The problem is this is not all that easy to do. The idea isn't so
hard to grok, but implementation may be a tall order. Pretend we have
a schema that defines only 3 elements. The root <test>, which has one
or more <para>s, each of which can have text or <name>; of course,
any element in our system can have an @xml:id:
start = element test {
attribute xml:id { xsd:ID }?,
para+
}
para = element para {
attribute xml:id { xsd:ID }?,
( text | name )*
}
name = element name {
attribute xml:id { xsd:ID }?,
("Horslips" | "Heart" | "Berlin" | "Blondie" | "Quarterflash" | "Renaissance")
}
That's a lovely working schema.[1] Let's say I also want to allow a
single element <otherStuff> to precede the paragraphs, and allow it
to have ANY content. Easy, with this method:
start = element test {
attribute xml:id { xsd:ID }?,
otherStuff?,
para+
}
para = element para {
attribute xml:id { xsd:ID }?,
( text | name )*
}
name = element name {
attribute xml:id { xsd:ID }?,
("Horslips" | "Heart" | "Berlin" | "Blondie" | "Quarterflash" | "Renaissance")
}
otherStuff = element otherStuff {
attribute xml:id { xsd:ID }?,
( text | anyXMLelement )*
}
anyXMLelement =
# for elements that already have @xml:id defined as ID, define it
# as ID here, too
element test | otherStuff | name | para {
attribute * - xml:id { text }*,
attribute xml:id { xsd:ID }?,
( text | anyXMLelement )*
}
|
# for all other elements, define @xml:id (and all other attrs) as
# just text
element * - ( test | otherStuff | name | para ) {
attribute * { text }*,
( text | anyXMLelement )*
}
This is also a lovely working schema. It has the HUGE advantage that
it does not trip over the "Conflicting ID-types" error. It has the
(minor) disadvantage that for some elements inside <otherStuff>
(namely, those that are NOT the enumerated <test>, <otherStuff>,
<name>, <para>) @xml:id values are not required to be NCNames, and
uniqueness of @xml:id values is not enforced. BUT those same problems
occur with our current method (and our previous method) of doing
this, and even more so as with those methods it applies to *all*
descendant elements.
The main problem, as I see it, is that it is hard to create the
schema. That list of names (here "test | otherStuff | name | para")
cannot be handled with indirection, because (AFAIK) an <rng:name>
cannot be inside an <rng:define>. It has to be built at schema-build
time, and then tucked into both places. And while building it you
have to remember to include namespaces where necessary (for us that
is only for "teix:egXML").[2]
Another monkey wrench is that to build the list you not only have to
go through all of the <tei:elementSpec>s in your flattened ODD, but
also all the <rng:element>s in any schemas included by a
<tei:moduleRef url="[MathML, SVG, whatever]"/>
(And no, I have not thought through whether you want *all* element
names, or only those that actually occur (perhaps indirectly via a
class) in a content model, or if it matters.)
I don't know how to do any of that off the top of my head, but my
thought is that it is probably not too hard, albeit a significant
amount of work.
To see what a resulting tei_all.rnc would look like, feel free to
take a look at [3], particularly the last dozen lines.
Notes
-----
[1] Working because the prefixes "xml:" and "xsd:" are magically defined.
[2] And, if you're writing in the compact syntax (which we wouldn't
be), to put a backslash in front of those names RELAX NG already
uses (for us that's \list, \namespace, \default, \text, and
\div)
[3] http://paramedic.wwp.northeastern.edu/~syd/temp/TEI_Council/tei_all_new_ANY…
Actually, now that I've tried it, I still get the same schematron
error.
Changed them all to:
<datatype>
<dataRef key="teidata.text"/>
</datatype>
but I still get: datatype content must be in the namespace ''
Have I mis-declared the @ns on the elementSpec?
-James
On 21/03/17 13:33, Lou Burnard wrote:
> You cant use textNode as a child of datatype. Change them tp
> datRef key teidata.text
>
> Sent from my Huawei Mobile
>
> -------- Original Message --------
> Subject: purifying tei_xinclude.odd exemplar
> From: James Cummings
> To: TEI Council ,Lou Burnard
> CC:
>
>
> Hi all,
>
> Because we should just purify these, but mostly because I wanted
> to include XInclude into an ODD I'm writing, I tried to purify
> the elementSpecs in
> https://github.com/TEIC/TEI/blob/dev/P5/Exemplars/tei_xinclude.odd#L73
>
>
>
> My attempt is at
> https://gist.github.com/jamescummings/b01882b2e33f612ec7ea361c6060698a
>
>
> But keeps giving me a schematron error "datatype content must be
> in the namespace '' ".
>
> I remember having a conversation with Lou about datatypes and
> namespaces but can someone remind me why I'm getting this error?
>
> -James
>
> --
> Dr James Cummings, James.Cummings(a)it.ox.ac.uk
> Academic IT Services, University of Oxford
>
--
Dr James Cummings, James.Cummings(a)it.ox.ac.uk
Academic IT Services, University of Oxford
Ah. Silly me.
Thanks!
James
--
Dr James Cummings, Academic IT Services, University of Oxford
On 21 Mar 2017 13:33, Lou Burnard <lou.burnard(a)retired.ox.ac.uk> wrote:
You cant use textNode as a child of datatype. Change them tp datRef key teidata.text
Sent from my Huawei Mobile
-------- Original Message --------
Subject: purifying tei_xinclude.odd exemplar
From: James Cummings
To: TEI Council ,Lou Burnard
CC:
Hi all,
Because we should just purify these, but mostly because I wanted
to include XInclude into an ODD I'm writing, I tried to purify
the elementSpecs in
https://github.com/TEIC/TEI/blob/dev/P5/Exemplars/tei_xinclude.odd#L73
My attempt is at
https://gist.github.com/jamescummings/b01882b2e33f612ec7ea361c6060698a
But keeps giving me a schematron error "datatype content must be
in the namespace '' ".
I remember having a conversation with Lou about datatypes and
namespaces but can someone remind me why I'm getting this error?
-James
--
Dr James Cummings, James.Cummings(a)it.ox.ac.uk
Academic IT Services, University of Oxford
Hi all,
Because we should just purify these, but mostly because I wanted
to include XInclude into an ODD I'm writing, I tried to purify
the elementSpecs in
https://github.com/TEIC/TEI/blob/dev/P5/Exemplars/tei_xinclude.odd#L73
My attempt is at
https://gist.github.com/jamescummings/b01882b2e33f612ec7ea361c6060698a
But keeps giving me a schematron error "datatype content must be
in the namespace '' ".
I remember having a conversation with Lou about datatypes and
namespaces but can someone remind me why I'm getting this error?
-James
--
Dr James Cummings, James.Cummings(a)it.ox.ac.uk
Academic IT Services, University of Oxford
Birth and death can be an equivalent of placeName they aren't _necessarily_ anything to do with dates but names of places where these events take place. This they should have all the same attributes of other names.
James
--
Dr James Cummings, Academic IT Services, University of Oxford
On 16 Mar 2017 23:38, Syd Bauman <s.bauman(a)northeastern.edu> wrote:
Can someone explain to me why the elements <birth> and <death> are
members of att.naming (@role & @nymRef) and att.canonical (@key &
@ref)?
Thanks.
--
tei-council mailing list
tei-council(a)lists.tei-c.org
http://lists.lists.tei-c.org/mailman/listinfo/tei-council
PLEASE NOTE: postings to this list are publicly archived
I've been thinking about what the Guidelines say about conformance in
chapter 23, following Michael's spate of tickets and the subsequent
debate last month. It seemed to me it might be helpful to establish
whether the Council agrees about what the notion of conformance *ought
to mean* before trying to make sure that the text of the Guidelines
express it. So I have prepared a little (really little!) document for
you to read and disagree or (hopefully) not with. All comments welcomed.
The document is at http://lb42.github.io/W/conformance.html (there was
an earlier version on my foxglove blog, but now that I've got my
ceteicean foo back I'll be maintaining this document on github instead)
Hi all,
If Council members could look at
https://github.com/TEIC/TEI/issues/1600 Syd has produced a lovely
set of tables with the current state of play. We are suggesting
that almost all members of model.personPart (which includes
model.persStateLike) should claim membership in att.typed (and
thus get @type and @subType).
https://github.com/TEIC/TEI/issues/1600
While there is some discussion as to what the particular
suggested values should be (Syd has assembled a list) there is
not much resistance to the idea. If anyone has any objections
could they please mention it in, say, the next week on the ticket?
-James
--
Dr James Cummings, James.Cummings(a)it.ox.ac.uk
Academic IT Services, University of Oxford