cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: question regarding namespaces and xsp
Date Mon, 05 Feb 2001 21:26:04 GMT
Donald Ball wrote:
> 
> On Mon, 5 Feb 2001, Berin Loritsch wrote:
> 
> > Donald Ball wrote:
> > >
> > > hiya. in my latest esql logicsheet, i've got a match like this:
> > >
> > > <xsl:template match="xsp:page/*[not(starts-with(name(.),'xsp:'))]">
> > >
> > > is this correct though? i'm imagining that someone writes a silly but
> > > valid xsp page:
> > >
> > > <myxsp:page
> > >   xmlns:myxsp="http://www.apache.org/1999/XSP/Core"
> > >   xmlns:esql="http://apache.org/cocoon/SQL/v2"
> > >   language="java"
> > > >
> > >
> > > <myxsp:structure>
> > >   <myxsp:include>com.example.Foo</myxsp:include>
> > > </myxsp:structure>
> > >
> > > <page/>
> > >
> > > </myxsp:page>
> >
> > At this point, the only prefix that will work for XSP is xsp:
> 
> well, that sucks, we should fix that. but based on your knowledge of XSLT,
> is my match value valid?

Based on my knowledge of XSLT, and XML Namespaces, the URI is what
really separates xsp and esql.  But I also know that you can have
multiple mappings to the URI--but they are not supposed to overlap.

In other words this is valid:

<root>
<xsp:page xmlns:xsp="http://apache.org/xsp">
  <xsp:logic/>
</xsp:page>
<myxsp:page xmlns:myxsp="http://apache.org/xsp">
  <myxsp:logic/>
</myxsp:page>
</root>

But this is not valid:

<xsp:page xmlns:xsp="http://apache.org/xsp">
  <myxsp:page xmlns:myxsp="http://apache.org/xsp">
    <myxsp:logic/>
  </myxsp:page>
</xsp:page>

But then again, I may have to read the spec again....

Mime
View raw message