Shot in the Dark: PBCore, XML Namespace declaration problem

ScottM

Taxi to Parking
Joined
Jul 19, 2005
Messages
42,530
Location
Variable, but somewhere on earth
Display Name

Display name:
iBazinga!
Having pains trying to get PBCore namespaces recognized in a file.

I keep getting an error that the editor cannot find the schema:

------------ERROR--------

Engine name: Xerces
Severity: error
Description: schema_reference.4: Failed to read schema document 'http://www.pbcore.org/pbcore/pbcoreXSD_Ver_1-2-1.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
URL: http://www.w3.org/TR/xmlschema-1/#schema_reference

---------------------------

Yet another file points to the same xsd files and has no problems finding it.

The declarations are:

<mets:mets xmlns:mets="http://www.loc.gov/METS/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:pbcore="http://www.pbcore.org/pbcore/pbcoreNamespace.html"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:mix="http://www.loc.gov/mix/v20"
xmlns:premis="info:lc/xmlns/premis-v2"
xsi:schemaLocation="http://www.loc.gov/METS/
http://www.loc.gov/standards/mets/mets.xsd
http://purl.org/dc/elements/1.1/
http://dublincore.org/schemas/xmls/qdc/2006/01/06/simpledc.xsd
http://www.pbcore.org/pbcore/pbcoreNamespace.html
http://www.pbcore.org/pbcore/pbcoreXSD_Ver_1-2-1.xsd
http://www.loc.gov/standards/mets/mets.xsd
http://dublincore.org/schemas/xmls/qdc/2006/01/06/simpledc.xsd
http://www.loc.gov/mix/v20 http://www.loc.gov/standards/mix/mix20/mix20.xsd
info:lc/xmlns/premis-v2
http://www.loc.gov/standards/premis/premis.xsd">

I cannot find the error.


If you have no idea what I am talking about that is understandable. I am just taking a shot that someone may be familiar enough with XML and possibly the METS and PBCore metadata standards to see the problem.
 
I did figure it out. I needed to walk away and then I came back and saw the issue. Although no one responded, in case someone sees this thread in the future it is a closed item.
 
What did you find?
I was done in by a find and replace.

I had a PBCore file that I had worked on where I had the namespace specified as:


xmlns: PBCore="http://www.pbcore.org/PBCore/PBCoreNamespace.html"

This allowed me to use the abbreviated tag <PBCore:identifier/> type of tags. But when I was working on the new file I had imported a record that used the namespace:


xmlns:pbcore="http://www.pbcore.org/PBCore/PBCoreNamespace.html"

The abbreviated tags were now <pbcore:identifier/>

If you can't see it the tag change from PBCore to pbcore, the first three letters are now lower case. I did a global find and replace of pbcore for PBCore and this changed the PBCores in the URIs to pbcore and the schema could no longer be found. I stared at the stuff for hours before finally fixing it. I knew it had worked at one time so I just could not see that the URIs had changed.

Dratted global find and replaces!!
 
I been burned by that too. Thanks for sharing & teaching
 
Back
Top