I see from searching the mailing lists and the confluence website that many 
times have folk had this error.
Currently, I get this error when I try to replace DC XML via modifyDatastream.

In order to modify DC terms in the DC stream of an object I

1) Grab the current DC content
2) Merge new/changed DC terms with the current DC content
3) Write a temp file containing the new DC content i.e. (saved as dc.xml)

<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ 
http://www.openarchives.org/OAI/2.0/oai_dc.xsd";>
        <dc:title>new</dc:title>
        <dc:identifier>unfenvc:11</dc:identifier>
        <dc:creator>stu</dc:creator>
        <dc:rights>all</dc:rights>
</oai_dc:dc>

4) Call modifyDatastream and have it grab the temp file

I get the, apparently common, error message from fedora

************
fedora.server.errors.GeneralException: XML was not well-formed. Content is not 
allowed in prolog.
   ...
Caused by: fedora.server.errors.GeneralException: XML was not well-formed. 
Content is not allowed in prolog.
   ...
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
************

I have checked the URL is formatted correctly and that the PUT method is being 
used (although there may be an issue - see my previous post).
I have checked there is no BOM character, added the normal XML header, and 
changed the encoding to UTF-16.  None has worked.

Anyone have any ideas from here?

Stuart Chalk, Ph.D.
Associate Professor of Chemistry
Department of Chemistry, University of North Florida
1 UNF Drive, Jacksonville FL 32224
P: 904-620-1938
F: 904-620-3535
E: sch...@unf.edu
W: http://www.unf.edu/coas/chemistry/


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

_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to