cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <o...@wlkp.org>
Subject JXTG Xpath returning NodeList
Date Sat, 24 Apr 2004 18:53:15 GMT

Say you have this DOM you pass to a template:

<?xml version="1.0"?>
<root>
  <property file="user.properties" />

  <path id="all.cp">
    <pathelement location="${build.classes}" />
    <fileset dir="${cocoon.lib}">
      <include name="*.jar"/>
    </fileset>
    <fileset dir="${jetty.lib}">
      <include name="*.jar"/>
    </fileset>
    <fileset dir="${hsqldb.lib}">
      <include name="*.jar"/>
    </fileset>
    <fileset dir="${lib}">
      <include name="**/*.jar"/>
      <include name="**/*.zip"/>
    </fileset>
  </path>
</root>

template follows:
<?xml version="1.0" encoding="utf-8"?>
<page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
	<content>
		#{document/root/path/fileset}
	</content>
</page>

The result is :
<?xml version="1.0" encoding="ISO-8859-1"?><page
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
	<content>
		<fileset dir="${cocoon.lib}">
      <include name="*.jar"/>
    </fileset>
	</content>
</page>

Why doesn't it return all matching nodes and only the first one?

same goes with i.e. #{document/root/*}

A feature or a bug ?
	lg

-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/       ouzo@wlkp.org           _\\()//_
         .'/()\'.     Phone: +48(501)720812     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


Mime
View raw message