[DDI-users] Question about Dublin Core elements
Samuel Spencer
theodore.therone at gmail.com
Tue Jan 13 18:44:13 EST 2015
Wendy,
The prefix is relatively unimportant when serialising XML. Technically the
namespace for the Dublin Core elements is "http://purl.org/dc/elements/1.1/",
while the namespace for Dublin Core Terms is "http://purl.org/dc/terms/".When
declaring their use in an XML document, you give a local prefix, like:
xmlns:dc="http://purl.org/dc/elements/1.1/", but this only has scope to
that document.
When handling XML, systems are free to convert a prefix to the full
namespace or replace them, or merge them, hence the occasional appearance
of ns1, ns2, ns3, etc..., once a document has been processed.
Of note, (I believe) it is impossible to set two namespaces to have the
same prefix, but the same namespace can have multiple prefixes, so this is
impossible:
<xml xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="
http://purl.org/dc/terms/" />
But this is is legal (albeit confusing):
<xml xmlns:dcterms="http://purl.org/dc/elements/1.1/" xmlns:dc="
http://purl.org/dc/elements/1.1/" />
Also note, in the above example after processing an XML processor may
decide to replace/harmonise the prefixes so they have the same prefix,
given that they both belong to the same namespace.
Ultimately, prefixes should be human readable, so I'd recommend dc/dcterms
to differentiate. But there is no requirement for this, so you can use
dc/dcterms, or stick with defaults like ns1/ns2, or get wild:
<michiganRocks:Fragment
xsi:schemaLocation="ddi:instance:3_2
http://www.ddialliance.org/Specification/DDI-Lifecycle/3.2/XMLSchema/instance.xsd
"
xmlns:michiganRocks="ddi:instance:3_2"
xmlns:goBlue="ddi:reusable:3_2"
>
<goBlue:Note>Please don't do this in practice!</goBlue:Note>
</michiganRocks:Fragment>
Cheers,
Sam.
PS. I realised far too late the MN is Minnesota, not Michigan, but I don't
know any UMN chants. Plus the list is hosted by UMich. So Go Blue I guess.
On Wed Jan 14 2015 at 10:19:21 Wendy Thomas <wlt at umn.edu> wrote:
> Hi everyone!
> Trying to get some user feedback. When we expanded the use of native
> Dublin Core from the base set to qualified Dublin Core (DDI-C 2.5 and DDI-L
> 3.2) we did it in a way that used the namespace dc: for all elements
> regardless of whether they were dc or dcterms. I use both in some
> bibliographic management at the MPC and was wondering if the consistent use
> of the single namespace dc: caused problems for people.
>
> I ask because we want to update the dcterms.xsd distributed in the DDI
> package to the 2008 version (which adds a number of elements). My gut
> response was to do so in a way that supported the use of both dc and
> dcterms but wanted to check with those of you who currently use it,
> especially if you use objects from the dcterms.xsd.
>
> Thanks for your input!
> Wendy
>
> --
> Wendy L. Thomas Phone: +1 612.624.4389
> Data Access Core Director Fax: +1 612.626.8375
> Minnesota Population Center Email: wlt at umn.edu
> University of Minnesota
> 50 Willey Hall
> 225 19th Avenue South
> Minneapolis, MN 55455
> _______________________________________________
> DDI-users mailing list
> DDI-users at icpsr.umich.edu
> http://lists.icpsr.umich.edu/mailman/listinfo/ddi-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.icpsr.umich.edu/pipermail/ddi-users/attachments/20150113/54be58a2/attachment.html
More information about the DDI-users
mailing list