xsd 1.1

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

xsd 1.1

Eduard Drenth
Dear all,

Does tei support xml schema 1.1? I would like to work with assertions without the need for a schematron processor.

Regards,

Eduard Drenth, Software Architekt

[hidden email]

Doelestrjitte 8
8911 DX  Ljouwert
+31 58 234 30 47

gpg: https://sks-keyservers.net/pks/lookup?op=get&search=0x065EF82A1E02CC43
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: xsd 1.1

C. M. Sperberg-McQueen
> On Jun 15, 2017, at 4:41 AM, Eduard Drenth <[hidden email]> wrote:
>
> Dear all,
>
> Does tei support xml schema 1.1? I would like to work with assertions without the need for a schematron processor.

Can you expand a bit on what you have in mind as
the meaning of the word “support” here?

********************************************
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
[hidden email]
http://www.blackmesatech.com
********************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: xsd 1.1

Eduard Drenth
Well, looking at the definition of tei:constraint I see only schematron elements can be included.

In tei I see a stylesheet that delivers schematron files.

When trying to find out how to validate a document against these files I find I have to transform schematron to xslt and than process the document with it.

Looks kind of devious to me, hence my interest in xsd 1.1 options.

I would like to be able to include xs:assert in tei:constraint, although at the moment there is no construct in the standard for custom error messages.

This would require odd => xsd 1.1 translation in tei, is that available?

Another option is to use xs:annotation and xs:appInfo, perhaps processors like xerces will pick that up.

How do you people do tei:constraint in practice?


Eduard Drenth, Software Architekt

[hidden email]

Doelestrjitte 8
8911 DX  Ljouwert
+31 58 234 30 47

gpg: https://sks-keyservers.net/pks/lookup?op=get&search=0x065EF82A1E02CC43

________________________________________
From: C. M. Sperberg-McQueen <[hidden email]>
Sent: Thursday, June 15, 2017 8:03 PM
To: Eduard Drenth
Cc: C. M. Sperberg-McQueen; [hidden email]
Subject: Re: xsd 1.1

> On Jun 15, 2017, at 4:41 AM, Eduard Drenth <[hidden email]> wrote:
>
> Dear all,
>
> Does tei support xml schema 1.1? I would like to work with assertions without the need for a schematron processor.

Can you expand a bit on what you have in mind as
the meaning of the word “support” here?

********************************************
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
[hidden email]
http://www.blackmesatech.com
********************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: xsd 1.1

C. M. Sperberg-McQueen
> On Jun 15, 2017, at 3:43 PM, Eduard Drenth <[hidden email]> wrote:
>
> Well, looking at the definition of tei:constraint I see only schematron elements can be included.
>
> In tei I see a stylesheet that delivers schematron files.
>
> When trying to find out how to validate a document against these files I find I have to transform schematron to xslt and than process the document with it.
>
> Looks kind of devious to me, hence my interest in xsd 1.1 options.
>
> I would like to be able to include xs:assert in tei:constraint, although at the moment there is no construct in the standard for custom error messages.
>
> This would require odd => xsd 1.1 translation in tei, is that available?

Thank you for the clarification.

I am not an expert in the TEI ODD stylesheets, but unless I am
mistaken, the XSD version of any ODD is created by generating
a Relax NG schema and then running Trang on the RNG.
As far as I can tell, Trang was last seriously revised in 2008 [1],
which was several years before XSD 1.1 became a W3C
Recommendation.  I do not believe that Trang offers XSD 1.1
as an output option.

[1] http://www.thaiopensource.com/relaxng/trang.html

>
> Another option is to use xs:annotation and xs:appInfo, perhaps processors like xerces will pick that up.
>
> How do you people do tei:constraint in practice?

I suspect most people use Schematron; it’s not really very hard to set up,
and I think there are now Schematron validators which do not require
any user-visible Schematron-to-XSLT translation step.  (But I am also not
a Schematron expert, so I might be wrong here.)

>
>
> Eduard Drenth, Software Architekt
>
> [hidden email]
>
> Doelestrjitte 8
> 8911 DX  Ljouwert
> +31 58 234 30 47
>
> gpg: https://sks-keyservers.net/pks/lookup?op=get&search=0x065EF82A1E02CC43
>
> ________________________________________
> From: C. M. Sperberg-McQueen <[hidden email]>
> Sent: Thursday, June 15, 2017 8:03 PM
> To: Eduard Drenth
> Cc: C. M. Sperberg-McQueen; [hidden email]
> Subject: Re: xsd 1.1
>
>> On Jun 15, 2017, at 4:41 AM, Eduard Drenth <[hidden email]> wrote:
>>
>> Dear all,
>>
>> Does tei support xml schema 1.1? I would like to work with assertions without the need for a schematron processor.
>
> Can you expand a bit on what you have in mind as
> the meaning of the word “support” here?
>
> ********************************************
> C. M. Sperberg-McQueen
> Black Mesa Technologies LLC
> [hidden email]
> http://www.blackmesatech.com
> ********************************************
>

********************************************
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
[hidden email]
http://www.blackmesatech.com
********************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: xsd 1.1

Syd Bauman-10
In reply to this post by Eduard Drenth
I'm sorry to say there are two completely opposite answers to your
question:

 1) Yes, it is perfectly valid TEI to use XSD statements inside
    <constraint>.

 2) No, the TEI stylesheets will not generate a useful XSD that will
    include the <xs:assert> constructs from inside <constraint>.

And while I agree that use of Schematron inside <constraint> can be
mildly annoying, the fact that most Schematron processors choose to
run the Schematron by converting it to XSLT first does not seem (to
me) to be a problem at all. And there exist Schematron processors
that do not convert to XSLT first (e.g., QuiXSchematron).

Personally I always put ISO Schematron into <constraint> (inside
<constraintSpec scheme='schematron'>) and use the TEI supplied
stylesheet[1] or a front-end to it (like Roma[2]) to create a
".isosch" file.[3] I then generally use either Probatron or
occasionally oXygen to validate my files against the Schematron.
Probatron runs from the commandline; its output is SVRL. I have
written a little bash front-end for it that shows me just plain text
error messages. (The front-end pgm uses `xmlstarlet` and `perl`.)


It is also worth noting that when converting an ODD to a RELAX NG
schema the standard TEI stylesheets include the Schematron code found
in <constraintSpec scheme='schematron'> in the output .rng or .rnc
file. However [1] is somewhat more robust, and is still being
improved. IIRC the code that handles putting that Schematron into
RELAX NG has bugs and has not been worked on in years.


Notes
-----
 [1] Source: https://github.com/TEIC/Stylesheets/blob/master/odds/extract-isosch.xsl
     Debian: /usr/share/xml/tei/stylesheet/odds/extract-isosch.xsl
     oXygen: .../frameworks/tei/xml/tei/stylesheet/odds/extract-isosch.xsl
     Development version of the source:
     https://github.com/TEIC/Stylesheets/blob/dev/odds/extract-isosch.xsl

 [2] http://www.tei-c.org/Roma/

 [3] I think the ".isosch" extension is clumsy, and would be in favor
     of moving to just ".sch" (even though it conflicts with Scheme),
     since TEI no longer supports Schematron 1.X.


> Well, looking at the definition of tei:constraint I see only
> schematron elements can be included.
>
> In tei I see a stylesheet that delivers schematron files.
>
> When trying to find out how to validate a document against these
> files I find I have to transform schematron to xslt and than
> process the document with it.
>
> Looks kind of devious to me, hence my interest in xsd 1.1 options.
>
> I would like to be able to include xs:assert in tei:constraint,
> although at the moment there is no construct in the standard for
> custom error messages.
>
> This would require odd => xsd 1.1 translation in tei, is that
> available?
>
> Another option is to use xs:annotation and xs:appInfo, perhaps
> processors like xerces will pick that up.
>
> How do you people do tei:constraint in practice?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: xsd 1.1

Eduard Drenth
Thanks for your extensive response!

At least this gives the option to use https://github.com/Schematron/schematron-exist in my case.

Another option I have is to import TEI generated xsd in a 1.1 xsd and manually add assertions there. I will ask the exist community if xerces is or can be configured to use 1.1 vaildators. If so I would have a fairly nice route for automatic validation including assertions in exist.

Bye,

Though I would prefer

Eduard Drenth, Software Architekt

[hidden email]

Doelestrjitte 8
8911 DX  Ljouwert
+31 58 234 30 47
+31 62 094 34 28 (privé)

gpg: https://sks-keyservers.net/pks/lookup?op=get&search=0x065EF82A1E02CC43

________________________________________
From: TEI (Text Encoding Initiative) public discussion list <[hidden email]> on behalf of Syd Bauman <[hidden email]>
Sent: Wednesday, June 21, 2017 4:11 PM
To: [hidden email]
Subject: Re: xsd 1.1

I'm sorry to say there are two completely opposite answers to your
question:

 1) Yes, it is perfectly valid TEI to use XSD statements inside
    <constraint>.

 2) No, the TEI stylesheets will not generate a useful XSD that will
    include the <xs:assert> constructs from inside <constraint>.

And while I agree that use of Schematron inside <constraint> can be
mildly annoying, the fact that most Schematron processors choose to
run the Schematron by converting it to XSLT first does not seem (to
me) to be a problem at all. And there exist Schematron processors
that do not convert to XSLT first (e.g., QuiXSchematron).

Personally I always put ISO Schematron into <constraint> (inside
<constraintSpec scheme='schematron'>) and use the TEI supplied
stylesheet[1] or a front-end to it (like Roma[2]) to create a
".isosch" file.[3] I then generally use either Probatron or
occasionally oXygen to validate my files against the Schematron.
Probatron runs from the commandline; its output is SVRL. I have
written a little bash front-end for it that shows me just plain text
error messages. (The front-end pgm uses `xmlstarlet` and `perl`.)


It is also worth noting that when converting an ODD to a RELAX NG
schema the standard TEI stylesheets include the Schematron code found
in <constraintSpec scheme='schematron'> in the output .rng or .rnc
file. However [1] is somewhat more robust, and is still being
improved. IIRC the code that handles putting that Schematron into
RELAX NG has bugs and has not been worked on in years.


Notes
-----
 [1] Source: https://github.com/TEIC/Stylesheets/blob/master/odds/extract-isosch.xsl
     Debian: /usr/share/xml/tei/stylesheet/odds/extract-isosch.xsl
     oXygen: .../frameworks/tei/xml/tei/stylesheet/odds/extract-isosch.xsl
     Development version of the source:
     https://github.com/TEIC/Stylesheets/blob/dev/odds/extract-isosch.xsl

 [2] http://www.tei-c.org/Roma/

 [3] I think the ".isosch" extension is clumsy, and would be in favor
     of moving to just ".sch" (even though it conflicts with Scheme),
     since TEI no longer supports Schematron 1.X.


> Well, looking at the definition of tei:constraint I see only
> schematron elements can be included.
>
> In tei I see a stylesheet that delivers schematron files.
>
> When trying to find out how to validate a document against these
> files I find I have to transform schematron to xslt and than
> process the document with it.
>
> Looks kind of devious to me, hence my interest in xsd 1.1 options.
>
> I would like to be able to include xs:assert in tei:constraint,
> although at the moment there is no construct in the standard for
> custom error messages.
>
> This would require odd => xsd 1.1 translation in tei, is that
> available?
>
> Another option is to use xs:annotation and xs:appInfo, perhaps
> processors like xerces will pick that up.
>
> How do you people do tei:constraint in practice?
Loading...