[MEI-L] MEI as XSD or DTD

Andrew Hankinson andrew.hankinson at mail.mcgill.ca
Fri Nov 13 14:36:11 CET 2015


For what it's worth, it's pretty easy to generate an XSD file directly from the MEI source using the TEI Stylesheets.

Here are the steps:

1. Get the TEI Stylesheet source: https://github.com/TEIC/Stylesheets
2. In the 'bin' directory there are a number of commands. You should run one to see if it complains -- you may need 'ant', 'jing', or 'trang' (but maybe not...)

3. To generate an XSD from, e.g., the MEI CMN Customization:

$> bin/teitoxsd --localsource=/path/to/mei/source/driver.xml /path/to/mei/customizations/mei-CMN.xml

This should generate the mei-CMN.xml.xsd file in the customizations directory. 

Many of the commands can be replaced to produce different outputs, so teitorelaxng or teitodtd.

For reference I've attached the most recent (MEI 3.0.0 pre-release) MEI-CMN XSD along with xlink, svg, and xml files as well.

-Andrew





> On Nov 13, 2015, at 1:24 PM, Andrew Hankinson <andrew.hankinson at mail.mcgill.ca> wrote:
> 
> No, don't be confused! I'm not an "XML person" so my knowledge of the kinds of tools that are out there is somewhat limited. That's why I asked.
> 
> -Andrew
> 
>> On Nov 13, 2015, at 11:58 AM, Anna Plaksin <annplaksin at gmx.net <mailto:annplaksin at gmx.net>> wrote:
>> 
>> Hi Andrew,
>>  
>> some months ago I was looking for XML editors with schema-based auto-completion and Oxygen is the only one I know with RNG support. Some others, as Rinzo, the TextGrid Lab and the XML Tools Plugin for Notepad++ support only auto-completion based on XSD.
>> And, okay… because C# is the programming language I’m using most, I don’t know how good the RelaxNG support in other frameworks is, but the .net framework provides native support of XML schema without any external libraries.
>>  
>> I have to admit that I am a little bit surprised of your question. Apart from the “digital humanities community” I don’t know any person working with XML data that are aware of RelaxNG, they’re all using XML schema. Hm, I feel a little bit confused right now.
>> Maybe in this situation I would feel fine if you just wait for other feedback.
>>  
>> Regards,
>> Anna
>>   <>
>> Von: mei-l [mailto:mei-l-bounces at lists.uni-paderborn.de <mailto:mei-l-bounces at lists.uni-paderborn.de>] Im Auftrag von Andrew Hankinson
>> Gesendet: Freitag, 13. November 2015 09:23
>> An: Music Encoding Initiative <mei-l at lists.uni-paderborn.de <mailto:mei-l at lists.uni-paderborn.de>>
>> Betreff: Re: [MEI-L] MEI as XSD or DTD
>>  
>> Hi Anna,
>>  
>> I'm curious to know which tools are in use that don't support RelaxNG -- is there a quick example you can share?
>>  
>> -Andrew
>>  
>>> On Nov 13, 2015, at 8:18 AM, Anna Plaksin <annplaksin at gmx.net <mailto:annplaksin at gmx.net>> wrote:
>>>  
>>> Hello Perry,
>>>  
>>> I would appreciate compatibility with XML Schema just because of the widespread support. Many more Editors and Frameworks natively support XML processing with automated validation against an XSD file. I experimented sometimes with a converted RNG file but there occurred false validation errors.
>>> So, I would be very happy about compatibility but I see your point either. If I am the only one wishing for it, this topic would seem rather unimportant to me…
>>>  
>>> Regards,
>>> Anna
>>>  
>>> Von: mei-l [mailto:mei-l-bounces at lists.uni-paderborn.de <mailto:mei-l-bounces at lists.uni-paderborn.de>] Im Auftrag von Roland, Perry D. (pdr4h)
>>> Gesendet: Donnerstag, 12. November 2015 21:49
>>> An: mei-l at lists.uni-paderborn.de <mailto:mei-l at lists.uni-paderborn.de>
>>> Betreff: [MEI-L] MEI as XSD or DTD
>>>  
>>>  
>>> Hello all,
>>>  
>>> The current content model of <provenance> uses a neat RNG trick that allows either an <eventList> or a text phrase.  No other schema language allows this kind of thing, so conversion of the RNG to an XSD or DTD form won't work.  Is there a need to maintain compatibility with XML Schema or DTDs?
>>>  
>>> --
>>> p.
>>>  
>>> ________________________________
>>> Perry Roland
>>> University of Virginia
>>> P. O. Box 400874
>>> Charlottesville, VA, 22904
>>> 434-982-2702 (w)
>>> pdr4h (at) virginia (dot) edu
>>>  
>>> _______________________________________________
>>> mei-l mailing list
>>> mei-l at lists.uni-paderborn.de <mailto:mei-l at lists.uni-paderborn.de>
>>> https://lists.uni-paderborn.de/mailman/listinfo/mei-l <https://lists.uni-paderborn.de/mailman/listinfo/mei-l>
>>  
>> _______________________________________________
>> mei-l mailing list
>> mei-l at lists.uni-paderborn.de <mailto:mei-l at lists.uni-paderborn.de>
>> https://lists.uni-paderborn.de/mailman/listinfo/mei-l <https://lists.uni-paderborn.de/mailman/listinfo/mei-l>
> _______________________________________________
> mei-l mailing list
> mei-l at lists.uni-paderborn.de
> https://lists.uni-paderborn.de/mailman/listinfo/mei-l

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-paderborn.de/pipermail/mei-l/attachments/20151113/7e44ecec/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mei-CMN.zip
Type: application/zip
Size: 83057 bytes
Desc: not available
URL: <http://lists.uni-paderborn.de/pipermail/mei-l/attachments/20151113/7e44ecec/attachment.zip>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-paderborn.de/pipermail/mei-l/attachments/20151113/7e44ecec/attachment-0001.html>


More information about the mei-l mailing list