cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Rocha <rica...@apache.org>
Subject Preserving namespaces in XSP
Date Sun, 07 May 2000 00:44:52 GMT
Namespaces used in XSP pages are normally dropped because of the way logicsheets
are applied.

It's now possible to preserve selected namespaces by declaring them in the XSP
page root element with the "xsp:" attribute prefix. Example:

<xsp:page language="java" xmlns:xxx="..."xmlns:yyy="..."> 
  <page xsp:my-namespace="my-uri">
    . . .
  </page>
</xsp:page>

Here, the attribute "xsp:my-namespace" will be expanded to "xmlns:my-namespace"
in the generated document. This, in turn, allows for stylesheets to specify
templates matching namespace-qualified elements.

It may be necessary to specify the same namespace twice (both in the <xsp:page>
and page root elements) if the namespace is used by logicsheets _and_ is to be
preserved on ouput.

Prior to this update, the namespace prefix had to be dropped in stylesheet
templates so that only the element name was matched. Stylesheets based on this
behaviour will continue to work.

If you do decide to preserve namespace(s), though, you _must_ revise your
stylesheet templates to ensure the namespace is matched as well.

Mime
View raw message