Improve document XML export using namespaces and prefixes
---------------------------------------------------------
Key: NXP-8734
URL: https://jira.nuxeo.com/browse/NXP-8734
Project: Nuxeo Enterprise Platform
Issue Type: Improvement
Affects Versions: 5.5
Reporter: Antoine Taillefer
Currently the document XML export does not fully take advantage of namespaces
and prefixes.
It would be nice to follow this W3C recommandation:
http://www.w3.org/TR/REC-xml-names/.
For example:
* The root element {{<document>}} does not have any namespace, whereas
namespaces are held by the {{<schema>}} elements:
{code:xml}
<document repository="default" id="134441c2-b993-4bd8-a5ee-0759c4082cc7">
<schema xmlns:dc="http://www.nuxeo.org/ecm/schemas/dublincore/"
name="dublincore">
...
</schema>
...
</document>
{code}
We could have a namespace on the {{<document>}} element, to be defined.
Why not something like:
{code:xml}
<nxdoc:document xmlns:nxdoc="http://www.nuxeo.org/ecm/document/" ...>
{code}
Not so sure if a per-schema namespace would then still be wanted / useful ?
* List and complex item elements are not prefixed in the XML export, they could
be:
{code:xml}
<dc:contributors>
<item>ataillefer</item>
<item>Administrator</item>
</dc:contributors>
{code}
* What about attribute names and values?
For example in a type-aware export we currently have:
{code:xml}
<dc:creator type="string">Administrator</dc:creator>
{code}
We could have a prefix for the {{type}} attribute name bound to the global
namespace {{nxdoc}}, and a prefix for the {{type}} attribute value, bound to
the standard XMLSchema namespace:
{code:xml}
<nxdoc:document xmlns:nxdoc="http://www.nuxeo.org/ecm/document/"
xmlns:xs="http://www.w3.org/2001/XMLSchema" ...>
...
<dc:creator nxdoc:type="xs:string">Administrator</dc:creator>
...
</nxdoc:document>
{code}
These are things to think about...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets