[MEI-L] XML Namespaces in MEI

Andrew Hankinson andrew.hankinson at mail.mcgill.ca
Thu Sep 4 20:29:16 CEST 2014


Ok, so by extension

<someElement xml:base=“something”>

is OK too?

On Sep 4, 2014, at 2:26 PM, Roland, Perry D. (pdr4h) <pdr4h at eservices.virginia.edu<mailto:pdr4h at eservices.virginia.edu>> wrote:

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”<http://www.w3.org/XML/1998/namespace%E2%80%9D>.

--
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
_______________________________________________
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/0af2b4c9/attachment.html>


More information about the mei-l mailing list