commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Sher" <>
Subject Jelly and XML tag library
Date Thu, 18 Sep 2003 13:17:24 GMT

When I am trying to process the following Jelly script I've got the error:
[java] org.apache.commons.jelly.JellyTagException: file:/C:/Work/SDS/templates/sample1.xhtml:31:105:
<x:transform> The node "org.dom4j.tree.DefaultElement@97d01f [Element: <h1 attributes:
[]/>]" could not be added to the branch "null" because: Cannot add another element to this
Document as it already has  a root element of: h1
[java]      at org.apache.commons.jelly.impl.TagScript.handleException(


<?xml version="1.0"?>
<j:jelly xmlns="" xmlns:j="jelly:core" xmlns:x="jelly:xml">

    <title>The first sample</title>

    <x:transform xslt="${basedir}/stylesheets/sample1-toc.xsl" xml="${basedir}/xml/sample1.xml"
    <x:transform xslt="${basedir}/stylesheets/sample1.xsl" xml="${basedir}/xml/sample1.xml"

    <table border="1" cellspacing="0" cellpadding="0">
        <td>Table Of Contents</td>
            <!-- TOC -->
            <x:copyOf select="$toc"/>
            <!-- TOC -->

    <table border="0" cellspacing="0" cellpadding="0">
            <!-- BODY -->
            <x:copyOf select="$book"/>
            <!-- BODY -->


If I use comment out second <x:transform var="book"/> and remove second <x:copyOf/>
then the script works fine. Maybe somebody knows why?

Best regards

Pavel Sher,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message