original namespace mapping
Julian Graham <[email protected]> Tue, 21 Dec 2004 15:20:49 -0500
| Newsgroups | gmane.lisp.scheme.ssax-sxml |
|---|---|
| Message-ID | <[email protected]> |
Hi everyone, Is there a way to retrieve the document-specified mapping between user namespace prefixes and the resolve URIs for those prefixes? It looks like this information is lost once ssax:xml->sxml finishes, and the only way to obtain that *NAMESPACE* member of the resulting S-expr is to specify the namespace mapping yourself. That is, if I have a document like: <foo xmlns:myPrefix="http://www.w3c.org/"> <myPrefix:special-element>Hello!</myPrefix:special-element> </foo> ...I'd like to be able to access the mapping between myPrefix and "http://www.w3c.org/". I realize that the XML Namespace specification encourages applications to use only the resolved URI once parsing is complete, but where does that leave me if I've got to do post-processing on data that only specifies the prefix that the original document used? In a case like this: <document xmlns:after="http://post.processing.specification/"> <after:oldNode value="hello"/> <addNodeInstruction namespace="after" name="newNode" value="goodbye"/> </document> ...my application has no way of knowing, for example, that oldNode and the soon-to-be-inserted newNode come from the same namespace. Any suggestions? Thanks, Julian ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/