You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Paul Libbrecht (JIRA)" <co...@jakarta.apache.org> on 2005/07/19 20:39:47 UTC

[jira] Commented: (JELLY-184) Using namespace-prefixes breaks Jelly

    [ http://issues.apache.org/jira/browse/JELLY-184?page=comments#action_12316144 ] 

Paul Libbrecht commented on JELLY-184:
--------------------------------------

Now that namespace-qualified attributes are supported overall

(TagScript's attribute-names are now the qualified names btw which I expect to be non-supported by beans).

Could you give one more try ?

thanks

paul

> Using namespace-prefixes breaks Jelly
> -------------------------------------
>
>          Key: JELLY-184
>          URL: http://issues.apache.org/jira/browse/JELLY-184
>      Project: jelly
>         Type: Bug
>   Components: core / taglib.core
>     Reporter: dion gillard

>
> Using feature "http://xml.org/sax/features/namespace-prefixes" breaks Jelly.
> 	SAXParserFactory pf = SAXParserFactory.newInstance();
> 	pf.setValidating (false);
> 	pf.setNamespaceAware (true);
>    	pf.setFeature ("http://xml.org/sax/features/namespace-prefixes", true);
> 	XMLReader reader = null;
>         SAXParser parser = pf.newSAXParser();
> 	reader = parser.getXMLReader();
> 	InputSource inSrc = new InputSource
> 	    (new FileReader(new File ("util/test.jelly")));
> 	Jelly jelly = new Jelly();
> 	JellyContext context = new JellyContext ();
> 	ExtXMLParser jellyParser = new ExtXMLParser ();
> 	jellyParser.setContext(context);
>  	jellyParser.configure ();
> 	reader.setContentHandler(jellyParser);
> 	reader.parse (inSrc);
>  	Script script = jellyParser.getScript ();
> 	script.compile ();
> 	script.run (context, XMLOutput.createXMLOutput(System.out));
> results in:
>     [junit] org.apache.commons.jelly.JellyTagException: null:-1:-1: <null>
> null:2:88: <j:jelly> This tag does not understand the '' attribute
>     [junit] 	at
> org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:600)
>     [junit] 	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:239)
>     [junit] 	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:89)
> The offending line is "pf.setFeature
> ("http://xml.org/sax/features/namespace-prefixes", true)"
> While setting this feature is, of course, not necessary for Jelly, the Jelly
> script I want to use in the real application is embedded within a larger XML
> file. This file is parsed into a SAX event buffer with the feature set (because
> in general, namespace-prefixes are needed). The SAX events belonging to the
> Jelly script are then "extracted" and fed to Jelly. Of course, I can filter out
> the namespace prefix attributes (and I will, as a workaround). But Jelly should,
> of course, not break because of these attributes being reported.
>  - Michael

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org