cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gene Hsu <G...@fastchannel.com>
Subject cinclude:include attributes (other than src)
Date Wed, 26 Mar 2003 21:04:25 GMT
How are cinclude:include attributes (other than src) supposed to work?

attributes are: element, ns, prefix, and select

-- foo.xml --
<foo>
  <item>1</item>
  <item>2</item>
</foo>
-- bar.xml --
<bar>
  <item>a</item>
  <item>b</item>
</bar>
-- baz.xsp --
<xsp:page language="java"
  xmlns:xsp="http://apache.org/xsp"
  xmlns:cinclude="http://apache.org/cocoon/include/1.0">
<baz>
  <cinclude:include src="foo.xml"/>
  <cinclude:include src="bar.xml"/>
</baz>
</xsp:page>
-- end --

I have only been able to see any effect when I specify the three 
attributes element, ns, and prefix.  And the effect that I see is
that the foo.xml or bar.xml is wrapped by the <prefix:element> specified
in the cinclude statement.

e.g. If I had specified <cinclude:include src="foo.xml" element="FOO"
prefix="A" ns="http://foo"/>, this would result in
<A:FOO><foo>
  <item>1</item>
  <item>2</item>
</foo>
</A:FOO>

I have been unable to see any effect using the select attribute, even 
when the XPath should select nothing.

Are these bugs? or what is the intended behavior?
The wiki implies different behavior than this, and the source code
doesn't reveal many hints at first glance.

Win2k
Cocoon Binary 2.0.4 (jvm14 build)
Sun J2SDK 1.4.1_01
Xalan 2.5d1

Thanks

-- Gene

Mime
View raw message