Hi Marc,Your steps look right to me. Did your error message have any more detail? When schematronvalidation fails, running exception.getMessage() from the client side should give you some text(possibly xml) detailing the problem. I'm guessing there was a problem serializing the DOM intothe byte array. One way to test that is: generate the byte array, but instead of sending it toFedora, send it to a file. Then try to ingest that via fedora-admin.- Chris
Hi Ross,
From: fedora-users-bounces@comm.nsdl.org [mailto:fedora-users-bounces@comm.nsdl.org] On Behalf Of Marc Schlüpmann
Sent: Monday, May 09, 2005 12:05 PM
To: Ross L. Wayland
Cc: Fedora-users@comm.nsdl.org
Subject: Re: [Fedora-users] Ingest Problem - Schematron Validationthank you for your quick answer.The spaces seem to be not the problem. I generated the XML from a DOM tree with the standard Java 1.4 XSL Transformer and I can ingest the XML by hand on my system with the commandline tool fedora-ingest as well. When I go with the SOAP API-M I get the validation error. Here are the steps of my code:User input is stored in an instance of a Java bean.From this instance I build a DOM tree.The DOM tree is transformed into a byte array containing the corresponding XML (I sent it to the list).The XML is send to Fedora using the ingest(byte[],String,String) method of the FedoraAPIM class.This call throws the Exception.Any idea?Marc
Am 09.05.2005 um 17:37 schrieb Ross L. Wayland:
Marc,
The example you posted seems to have 3 errant spaces. This could be a result of emailing the text, so check if the file you are trying to ingest contains the extra spaces denoted below.... Once removing these, I was able to ingest your object(see attached file) using the fedora admin client with no errors.
Ross
Marc Schlüpmann wrote:
Hi,extra space ^
I am developing a web-based (JSP) System on top of Fedora 2.0 and I have severe problems ingesting a new document into Fedora. My system creates the XML below from some user input and tries to ingest it into the Fedora system by using SOAP (API-M).
I always get a Schematron validation error that the validation rules fail (failed Schematron rules validation.). I checked the validation rules against my XML manually but did not find a problem. What astonishes me: the same XML is accepted by the commandline tool fedora-ingest without a problem. The document resides in Fedora.
For a quick response I would be grateful.
Regards,
marc
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject xmlns:foxml="info:fedora/fedora-system:def/ foxml#"
<> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://
www.fedora.info/definitions/1/0/foxml1-0.xsd">
^ extra space
<foxml:objectProperties>
<foxml:property NAME="http://www.w3.org/1999/02/22-rdf-syntax- ns#type" VALUE="FedoraObject"/>
extra space ^
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="A"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Titel"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC.0" LABEL="Default Dublin Core Record" MIMETYPE="text/xml">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/">
<dc:title>Titel</dc:title>
<dc:creator>Autor</dc:creator>
<dc:subject>Stichworte</dc:subject>
<dc:publisher>Herausgeber</dc:publisher>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>
-- marc schlüpmann
computer scientist
döllingerstraße 23
80639 münchen
germany
fon +49 89 95476380
cell +49 179 9224121
_______________________________________________
Fedora-users mailing list
Fedora-users@comm.nsdl.org
http://comm.nsdl.org/mailman/listinfo/fedora-users-- ________________________________________________________________________ Ross Wayland Email: rlw@virginia.edu University of Virginia Phone: 434-924-0746 Alderman Library - Systems Office FAX: 434-924-1431 Charlottesville, VA 22903-2498<?xml version="1.0" encoding="UTF-8"?><foxml:digitalObject xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-0.xsd"><foxml:objectProperties><foxml:property NAME="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" VALUE="FedoraObject"/><foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="A"/><foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Titel"/></foxml:objectProperties><foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true"><foxml:datastreamVersion ID="DC.0" LABEL="Default Dublin Core Record" MIMETYPE="text/xml"><foxml:xmlContent><oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"><dc:title>Titel</dc:title><dc:creator>Autor</dc:creator><dc:subject>Stichworte</dc:subject><dc:publisher>Herausgeber</dc:publisher></oai_dc:dc></foxml:xmlContent></foxml:datastreamVersion></foxml:datastream></foxml:digitalObject>
--marc schlüpmanndiplom informatikerdöllingerstraße 2380639 münchengermanyfon +49 89 95476380cell +49 179 9224121
--
marc schlüpmann
diplom informatiker
döllingerstraße 23
80639 münchen
germany
fon +49 89 95476380
cell +49 179 9224121