Peter Crowther wrote:
> Found the glitch, after considerable experimentation. Different
> versions of Xerces appear to treat a wildcard ("*") namespaceURI in
> ElementImpl::getAttributeNS() differently. This means that code that
> successfully located <imsmd:langstring imsmd:lang="en"> and <langstring
> lang="en"> in the version of the parser in which I developed the CP
> extensions does not work with newer Xerces versions.
>
> Anyone know of a portable way of wildcarding the namespace URI?
Actually thinking about this would it make any sense? getAttributeNS()
returns a String and so what happens when the XML is:
<langstring lang="en" xml:lang="en-US"/>
Which attribute value should it return? The reason you have to specify a
namespace and can't wildcard is so that you can only ever have one value
returned as this isn't valid XML:
<langstring lang="en" lang="en-US"/>
I think the only real solution is to call it multiple times with the
namespaces expected.
--
-- Matthew Buckett, VLE Developer
-- Learning Technologies Group, Oxford University Computing Services
-- Tel: +44 (0)1865 283660 http://www.oucs.ox.ac.uk/ltg/
|