David Caruana wrote:
I'm struggling to pass the ExportDocViewTest even though I believe I
have generated a compliant document xml view.

All is fine until the ExportDocViewTest.compareNamespaces() method is
called.  It attempts to extract the namespaces that have been declared
on the root document node by getting all attributes on the node and
seperating those that are xmlns prefixed.
My problem is that the root node never has the xmlns attributes in the
dom result - it only contains the "true" attributes.  The
TransformerFactory and Transformer implementations are org.apache.xalan
in my environment.

That's a bit strange, because the namespace declarations are definitively there as your example shows. Have you been able to narrow down whether it's the DOM implementation or the test case that could not find the namespace declarations?

Also, the assert at the end subtracts one from the number of registered
namespaces - why? For the xml namespace?

That's because the xml namespace is implicitly defined in an xml document, but the namespace registry in JCR will still contain the prefix to namespace mapping. The -1 compensates that fact.

I also noticed that a namespace declaration for the empty namespace is missing in your document view sample. See last paragraph of section 7.2.

regards
 marcel

Regards,
Dave
www.alfresco.org

Here's an example of a simple noRecurse exported document in case I'm
missing something here...

<?xml version="1.0"?>
<testdata jcr:primaryType="jcrtest:testtype"
jcr:mixinTypes="mix:referenceable"
jcr:uuid="caf234a8-2c1f-11da-a3a2-031c8d888c9d"
jcrtest:booleanProp="true" jcrtest:doubleProp="3.141592653589793"
jcrtest:dateProp="2005-09-16T19:20:05.034+01:00"
jcrtest:longProp="90834953485278298" jcrtest:nameProp="jcrtest:test"
jcrtest:stringProp="2005-09-16T20:20:05.555+01:00"
xmlns:app="http://www.alfresco.org/model/application/1.0";
xmlns:jcrtest="http://www.alfresco.org/test/jcr/1.0";
xmlns:usr="http://www.alfresco.org/model/user/1.0";
xmlns:rule="http://www.alfresco.org/model/rule/1.0";
xmlns:jcr="http://www.jcp.org/jcr/1.0";
xmlns:ver="http://www.alfresco.org/model/versionstore/1.0";
xmlns:mix="http://www.jcp.org/jcr/mix/1.0";
xmlns:act="http://www.alfresco.org/model/action/1.0";
xmlns:d="http://www.alfresco.org/model/dictionary/1.0";
xmlns:nt="http://www.jcp.org/jcr/nt/1.0";
xmlns:cm="http://www.alfresco.org/model/content/1.0";
xmlns:alf="http://www.alfresco.org";
xmlns:sv="http://www.jcp.org/jcr/sv/1.0"/>


Reply via email to