cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: I can't declare a namespace in XSP
Date Thu, 26 Apr 2001 08:38:56 GMT


giacomo a écrit :
> 
> On Wed, 25 Apr 2001, Sylvain Wallez wrote:
> 
> >
> >
> > Berin Loritsch a écrit :
> > >
> > > I am trying to declare the xforms namespace in a page I am using,
> > > however, I am suffering from issues dealing with the namespace
> > > stripping algorithm in XSP.
> > >
> > > I want to use <xform:button> et. al., but every time I try to
> > > declare the namespace it gets stripped out.
> > >
> > Can you please post a sample ? I checked on the latest CVS by altering
> > simple.xsp and it's OK.
> >
> > BTW, I noticed that requesting foo.xsp?cocoon-view=content strips all
> > namespace declarations, resulting in an incorrect document, but the
> > start/endPrefixMapping are in the generated java source code.
> 
> I think you discovered a bug in the XSP engine. I've put a
> LogTransformer after the xsp generator into the sitemap. Yes, it report
> the start-/endPrefixMappings correctly but as I think having discovered
> with the ContentAggregator that is not enough. It should add them as
> xmlns attributes to the following element.
> 

Quoting the org.xml.sax.ContentHandler#startElement javadoc :
The attribute list will contain attributes used for Namespace
declarations (xmlns* attributes) only if the
http://xml.org/sax/features/namespace-prefixes property is true (it is
false by default, and support for a true value is optional).

I grep'ed the sources for this feature and found it in
AbstractMarkupLanguage.java, LogicSheet.java and JaxpParser.java (does
it mean all places where parsing occurs?). So obviously Cocoon needs it.

> Can anybody take a look at it, must be in the xsp.xsl file.

I can do it (I did a previous patch for removing unneeded namespace
generation), but could someone explain me why it's needed and
start/endPrefixMappings aren't enough ?

> 
> Giacomo
> 

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message