commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincenz Braun" ...@bigdot.de>
Subject [JELLY] Bug in ImportTag as child of TransformTag
Date Mon, 24 Feb 2003 00:48:24 GMT
Hello,

when transforming an imported jelly file an exception is thrown:

Use case;

import.jelly:
<?xml version="1.0" encoding="ISO-8859-1"?>
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" >
	<x:transform xslt="import.xsl">
		<j:import inherit="true" uri="imported.jelly"/>
	</x:transform>
</j:jelly>

imported.jelly:
<?xml version="1.0" encoding="ISO-8859-1"?>
<j:jelly  xmlns:j="jelly:core">
	<root/>
</j:jelly>

imported.xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0" 
	
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:template match="root">
		<html></html>
	</xsl:template>
	
</xsl:stylesheet>

The exception is:
[snip] <j:import> could not import script
	at
org.apache.commons.jelly.tags.xml.TransformTag.doTag(TransformTag.java:204)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
	at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
	at
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
	at
org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
	at
org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:623)
	at
org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:529)
[snip]

[snip] <j:import> could not import script
	at
org.apache.commons.jelly.tags.xml.TransformTag$TagBodyXMLReader.doInvokeBody
(TransformTag.java:527)
	at
org.apache.commons.jelly.tags.xml.TransformTag$TagBodyXMLReader.parse(Transf
ormTag.java:482)
	at
org.apache.commons.jelly.tags.xml.TransformTag.doTag(TransformTag.java:190)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
	at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
	at
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
	at
org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:91)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
	at
org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:623)
	at
org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:529)
[snip]
Root cause
Exception in thread "main" 

This script works:
import2.jelly:
<?xml version="1.0" encoding="ISO-8859-1"?>
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" >
    <j:import inherit="true" uri="imported.jelly"/>
</j:jelly>

Any idea for a workaround?,
Vincenz


Mime
View raw message