Hi,
Here's an obscure problem that's preventing my documents being inserted into an eXist database:
I have the following pipeline:
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xdb="http://orbeon.org/oxf/xml/xmldb"
xmlns:xdt="http://www.w3.org/2003/11/xpath-datatypes"
xmlns:carn="http://www.cacr.caltech.edu/projects/us-vo/schemas/ Carnivore"
>
<p:param type="input" name="instance"/>
<p:processor name="oxf:xslt">
<p:input name="data" href="#instance"/>
<p:input name="config">
<carn:RegistryEntry xsl:version="2.0">
<carn:RegistryData>
<carn:User><xsl:value-of select="/form/user"/></carn:User>
<carn:Id><xsl:value-of select="//*:identifier"/></carn:Id>
<carn:CreationDate><xsl:value-of select="adjust-dateTime-to-timezone(current-dateTime(), xdt:dayTimeDuration('PT0H'))"/></carn:CreationDate>
<carn:LastModificationDate><xsl:value-of select="adjust-dateTime-to-timezone(current-dateTime(), xdt:dayTimeDuration('PT0H'))"/></carn:LastModificationDate>
<carn:Source>mercury.cacr.caltech.edu:8080/carnivore</carn:Source>
<carn:Version>Current</carn:Version>
<carn:Set/>
<carn:ValidationLevel>0</carn:ValidationLevel>
</carn:RegistryData>
<carn:RegistryItem>
<xsl:copy-of select="/form/document/*"/>
</carn:RegistryItem>
</carn:RegistryEntry>
</p:input>
<p:output name="data" id="registryEntry"/>
</p:processor>
<!-- Insert new document -->
<p:processor name="oxf:xmldb-insert">
<p:input name="datasource" href="../datasource.xml"/>
<p:input name="query">
<xdb:insert collection="/db/test"/>
</p:input>
<p:input name="data" href="#registryEntry"/>
</p:processor></p:config>
and when I run it, I get an error about xmlns:xu having no content:
org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="xu",rawname="xmlns:xu"" is invalid. Prefixed namespace bindings may not be empty.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unkno wn Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis patcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno wn Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.exist.collections.Collection.determineTreeStructure(Collection.java: 1114)
at org.exist.collections.Collection.validate(Collection.java:851)
at org.exist.xmldb.LocalCollection.storeXMLResource(LocalCollection.java: 590)
at org.exist.xmldb.LocalCollection.storeResource(LocalCollection.java:531)
at org.orbeon.oxf.processor.xmldb.XMLDBProcessor.insert(XMLDBProcessor.java :343)
I put a logging statement into XMLDBProcessor to see what the XMLResource content is that is being sent to eXist and the log shows:
<carn:RegistryEntry xmlns:xu="http://www.xmldb.org/xupdate" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:carn="http://www.cacr.caltech.edu/projects/us-vo/schemas/ Carnivore" xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xdt="http://www.w3.org/2003/11/xpath-datatypes"><carn: RegistryData><carn:User/><carn:Id>ivo://nvo.caltech/B/1</carn:Id><carn: CreationDate>2004-10-14T19:53:51.826Z</carn:CreationDate><carn: LastModificationDate>2004-10-14T19:53:51.826Z</carn: LastModificationDate><carn:Source>mercury.cacr.caltech.edu:8080/ carnivore</carn:Source><carn:Version>Current</carn:Version><carn:Set/ ><carn:ValidationLevel>0</carn:ValidationLevel></carn: RegistryData><carn:RegistryItem xmlns:xu="" xmlns:oxf="" xmlns:xdb="" xmlns:p="" xmlns:xdt=""><vr:resource xmlns:vr="http://www.ivoa.net/xml/VOResource/v0.10" xmlns:xu="" xmlns:oxf="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:carn="" xmlns:xdb="" xmlns:p="" xmlns:xdt="" status="active" updated="1970-01-01" xsi:xsi:type="cs:ConeSearch" created="1970-01-01">
So it looks as though at the point where <xsl:copy-of select="/form/document/*/> is called in the pipeline, all unused namespaces have their content missing. Is this a bug in the SAX parser?
Cheers,
Matthew
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ orbeon-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/orbeon-user
