Re: Extension elements and namespace prefixes

Subject: Re: Extension elements and namespace prefixes
From: Denys Duchier <Denys.Duchier@xxxxxxxxxxxx>
Date: 16 Aug 1999 09:34:21 +0200
James Clark <jjc@xxxxxxxxxx> writes:

> Even for output handlers, there is a bit of the problem here.  An output
> handler should not be stripping of namespace prefixes; rather if it
> needs to recognize specific elements, it should be recognizing the
> expanded name (the namespace URI/local name pair) not the qualified
> name. At the moment do to this properly, it would have to process
> namespace declarations, which is not very convenient (and a waste since
> XT uses the expanded names internally, as any XSLT processor must).

It seems to me that the simplest fix would be to define
OutputDocumentHandler to support both

        startElement(String name,AttributeList atts)
and     startElement(Name   name,AttributeList atts)

the latter can always be given the default definition:

        public void startElement(Name name,AttributeList atts)
        {
          startElement(name.getPrefix()+":"+getLocalPart(),atts);
        }

or something like this.

-- 
Dr. Denys Duchier			Denys.Duchier@xxxxxxxxxxxx
Forschungsbereich Programmiersysteme	(Programming Systems Lab)
Universitaet des Saarlandes, Geb. 45	http://www.ps.uni-sb.de/~duchier
Postfach 15 11 50			Phone: +49 681 302 5618
66041 Saarbruecken, Germany		Fax:   +49 681 302 5615


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread