[Phoenix] Constraints on XML documents to work with Yulup
Andreas Wuest
awuest at student.ethz.ch
Fri Sep 22 21:46:36 CEST 2006
Hi
Summing up the previously mentioned problems, an XML source document and
its associated XSLT have to fulfil the following constraints to
currently work with Yulup:
XML source:
(1) IFF namespace(s) are used in a XML document, then all elements
MUST be prefixed.
(2) IFF namespace(s) are used in a XML document, then all namespace
declarations MUST occur at the document root element.
(3) IFF namespace(s) are used in a XML document, then namespace
prefixes MUST NOT be overridden in a descendant element (but this is
ruled out by constraint number 2 anyway).
XSLT:
(4) Namespace prefix tuples (i.e. {prefix,namespace}) used in the XSLT
stylesheet MUST be equal to those used in the XML source.
Note that you can happily use XML documents which don't make use of
namespaces though.
Note also that we might be able to drop constraint number (1) by
introducing custom prefixes for all elements.
Note also that we might be able to drop constraint number (2) by first
gathering all namespace information contained in that document, but this
would be mutually exclusive with solving constraint number (3).
Note also that we might be able to drop constraint number (4) by copying
all namespace declarations used in the XSLT stylesheet to an
intermediate copy of the XML source.
And last but not least, note that implementing namespace-unawareness
resolves all of those 4 constraints (although at the cost of introducing
new problems).
--
Kind regards,
Andi
More information about the Phoenix
mailing list