Jeff:

Finally getting around to saying thanks for the reply. I hadn't carefully read the namespace parts of the XML documents, and assumed that namespaces were not quite as flexible as they are (ie. I thought a prefix/namespace pair were fixed for an entire document). Now I understand why I was asking the wrong question.

Thanks - Mark

Jeff Greif wrote:

I don't think the namespace prefix is a part of the PSVI (or the XML infoset
either).  The only aspects of namespace prefixes that would be in the
infosets would be the xmlns:foo="fooNamespaceUri" attributes.

In general, the mapping namespace <-> prefix is many to many.  The same
prefix can be used for different namespaces at different nodes in the
document.  At any given node, there may be multiple prefixes defined all for
the same namespace.  But each node has only one prefix and only one
namespace.

A way to get the unique namespace <-> prefix association for any given
element or attribute in a document is to get them from the DOM node in
question using the standard getNamespaceURI() and getPrefix() methods.

Jeff
----- Original Message ----- From: "Mark Brucks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 26, 2003 8:53 AM
Subject: access to namespace prefix





Given a namespace URI, I'm trying to get the namespace prefix. How does
one do this from within the PSVI framework? XSObject has a
getNamespace() method, but there is no getPrefix() method.
Alternatively, how does one get at the NamespaceSupport or
SchemaNamespaceSupport instances that I assume must be created during
schema processing? If I could get access to these instances, I can get
the namespace prefix.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to