As far as I am concerned it is OK. Thanks.
BTW, I will be on holiday from now on so will not respond to mail for the next two weeks.
Theo
________________________________
From: SRU (Search and Retrieve Via URL) Implementors on behalf of Ray Denenberg
Sent: Thu 4/24/2008 8:48 PM
To: [log in to unmask]
Subject: Re: DCX Schema
Theo - I will change the schema as you suggest, if there are no further suggestions or comments.
Any comments on this, please post by next Friday, May 2.
--Ray
----- Original Message -----
From: Theo van Veen <mailto:[log in to unmask]>
To: [log in to unmask]
Sent: Wednesday, April 23, 2008 1:07 PM
Subject: Re: DCX Schema
The way we currently use dcx is different. We use a single container to contain dc, dcterms and other namespaces and separate containers for simpleDc,. dcTerms and otherElements. My preferred schema would look like the one below. I do not know if it is possible, but it would be handy if we could also use oai_dc and srw_dc:dc as container name.
Theo
___________________________
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:dc="http://purl.org/dc/terms/">
<xs:element name="dcx" type="dcxType"/>
<xs:complexType name="dcxType">
<xs:sequence>
<xs:choice maxOccurs="unbounded">
<xs:element ref="dc:title"/>
<xs:element ref="dc:creator"/>
<xs:element ref="dc:subject"/>
..........
<xs:element ref="dc:mediator"/>
<xs:element ref="dc:educationLevel"/>
<xs:element ref="dc:accessRights"/>
<xs:element ref="dc:license"/>
<xs:element ref="dc:bibliographicCitation"/>
</xs:choice>
<xs:any maxOccurs="unbounded" namespace="##any" processContents="lax"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
________________________________
Van: SRU (Search and Retrieve Via URL) Implementors [mailto:[log in to unmask]] Namens Ray Denenberg, Library of Congress
Verzonden: dinsdag 22 april 2008 23:46
Aan: [log in to unmask]
Onderwerp: DCX Schema
Please see the new DCX schema, at:
http://www.loc.gov/standards/sru/resources/dcx/dcx.xsd
I think this schema addresses the issues raised in recent discussion.
There is a sample instance xml file at:
http://www.loc.gov/standards/sru/resources/dcx/dcx.xml
Which tells you just about all you need to know.
But for those of you with a perverse interest in the convoluted world of namespaces here are a few additional notes, that I don't recommend reading.
1. The schema imports the dcterms schema from the dc website. That schema in turn references two additional schemas, dc and dcmitype. I have copied all three schemas to LC and dcx references them from here, because I had to make a small modification for this to work. There is an ambiguity in the definition of the dcterms schema, it is described in a comment I added to the local version at http://www.loc.gov/standards/sru/resources/dcx/dcterms.xsd
This problem has been reported to the DC folks and when it is resolved we can reference the schema from the official site. Apparently nobody had tried to combine elements in this fashion so the ambiguity was not discovered.
2. The instance file uses different prefixes for simple dc and dcterms, e.g. dc:title vs. dcterms:alternative, and thus apparent different namespaces. In reality the two namespaces are the same. So you could actually use the dc prefix for all elements and it won't make any difference or have any different meaning. These are all defined in the same namespace by Dublin Core. I'm not really sure whether it is a good idea or not to introduce this artificial distinction, and will remove it if people argue that it is not a good idea. I introduced it because I have the impression from the discussion we had that people want to explicitly segregate the simple elements from the new ones.
3. Firefox has a nasty habit of streamlining xml, hiding what it thinks is irrelevant but often is important. The instance file is better seen with IE. For convenience, here it is:
--------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
- <!--
this is a sample instance document for the dcx schema
-->
- <http://www.loc.gov/standards/sru/resources/dcx/dcx.xml> <dcx xmlns="info:lc/xmlns/dcx-v1" xmlns:dc="http://purl.org/dc/terms/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:lc/xmlns/dcx-v1 dcx.xsd">
- <http://www.loc.gov/standards/sru/resources/dcx/dcx.xml> <simpleDc>
<dc:title />
<dc:description />
</simpleDc>
- <http://www.loc.gov/standards/sru/resources/dcx/dcx.xml> <dcTerms>
<dcterms:alternative />
<dcterms:audience />
</dcTerms>
- <http://www.loc.gov/standards/sru/resources/dcx/dcx.xml> <otherElements>
<mods:genre xmlns:mods="http://www.loc.gov/mods/v3" schemaLocation="http://www.loc.gov/standards/mods/v3/mods-3-3.xsd">fiction</mods:genre>
<other:xyz xmlns:other="info:xxx">xxx</other:xyz>
</otherElements>
</dcx>
------------------------------------------------------------------------
So you can see that xmlns:dc and xmlns:dcterms are the same namespace.
4. Note that the <otherElements> is defined in the schema as validation "lax" meaning that if a schema is supplied, validate, if not, don't. So in the example there are two "other" elements. One is a MODS element and the MODS schema is supplied, so it is validated. For the other, no schema is supplied so there is no validation.
--Ray
|