[MEI-L] XML Namespaces in MEI

Roland, Perry D. (pdr4h) pdr4h at eservices.virginia.edu
Thu Sep 4 20:26:39 CEST 2014


It's enough to say



<mei xmlns="http://www.music-encoding.org/ns/mei">

  <someElement xml:id="abc123" />

</mei>



(oXygen seems to understand that @id is in the XML namespace.)



but



<?xml version="1.0" encoding="UTF-8"?>

<mei xmlns:xml="http://www.w3.org/XML/1998/namespace"

  xmlns="http://www.music-encoding.org/ns/mei">

  <someElement xml:id="abc123" />

</mei>



is ok too.



You just can't declare the XML namespace as anything other than "http://www.w3.org/XML/1998/namespace".



--

p.





> -----Original Message-----

> From: mei-l [mailto:mei-l-bounces at lists.uni-paderborn.de] On Behalf Of

> Andrew Hankinson

> Sent: Thursday, September 04, 2014 2:11 PM

> To: Music Encoding Initiative

> Subject: [MEI-L] XML Namespaces in MEI

>

> Hi all,

>

> Does anyone know how the xml: namespace prefix works? Do you have to

> declare it explicitly, or is it always implicitly declared?

>

> So, do you have to do this:

>

> <mei xmlns:xml="http://www.w3.org/XML/1998/namespace"

> xmlns="http://www.music-encoding.org/ns/mei">

>     <someElement xml:id="abc123" />

> </mei>

>

> Or is it enough to do this:

>

> <mei xmlns="http://www.music-encoding.org/ns/mei">

>     <someElement xml:id="abc123" />

> </mei>

>

> -Andrew

> _______________________________________________

> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-paderborn.de/pipermail/mei-l/attachments/20140904/feed44ce/attachment.html>


More information about the mei-l mailing list