Re: [Q] How should SAX support Namespaces?

Peter Murray-Rust (peter@ursus.demon.co.uk)
Fri, 24 Jul 1998 23:45:51


At 16:37 24/07/98 -0400, John Cowan wrote:
>Peter Murray-Rust wrote:
>
>> [I]f we can find a SEPARATOR which is
>> guaranteed not to occur in a URN it just makes it a bit easier (this is
>> DavidM's #2 but with something other than COLON). [It never sees the light
>> of day, anyway].
>
>Dagger! \U2020! Dagger!
>
>> <?jumbo:namespace ns="http://xml-cml.org" prefix="CML"
>> java="jumbo.cml.%sNode">
>> where localPart (with initial capitalises letter) replaces %s. Thus
>> CML:Molecule is mapped to jumbo.cml.MoleculeNode. When a common mechanism
>> is agreed this PI can be disabled.
>
>The trouble here IMHO is that this mapping is app-specific, not really
>document-specific. You will want to load various Java classes
>depending on what you want to *do* to a particular element:
>edit it, render it, translate its content into HTML, ...

I fully agree. This was just a first pass to illustrate some of the
concerns for namespace processing. As I have said before I'd love to get
consensus on a series of possible behaviours/functions that one might map
elements to. At present I have one main function - JComponent
XNode.getDisplayComponent() which returns a component for embedding into a
SwingSet environment. But I'm also trying to devise validate(),
processRecursively(), etc.

I am not sure that these are naturally going to arise elsewhere..

[...PMR namespace concerns snipped...]
IT was probably not a good idea to raise concerns of this sort and we
should wait for enlightenment from the W3C.

P.

Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg