You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Diogo Bacelar Quintela (JIRA)" <co...@jakarta.apache.org> on 2005/08/16 20:32:54 UTC

[jira] Created: (JELLY-217) org.apache.commons.jelly.tags.xml.ElementTag small bug in output wrapper

org.apache.commons.jelly.tags.xml.ElementTag small bug in output wrapper
------------------------------------------------------------------------

         Key: JELLY-217
         URL: http://issues.apache.org/jira/browse/JELLY-217
     Project: jelly
        Type: Bug
  Components: taglib.xml  
    Reporter: Diogo Bacelar Quintela
    Priority: Trivial


ElementTag has some small problems

XMLOutput newOutput = new XMLOutput(output) {
        ...
}

Should include

public void startPrefixMapping(String prefix, String uri)
throws SAXException {
        initialize();
       super. startPrefixMapping (prefix, uri);
}


startPrefixMapping is called automatically in startElement,  so whenever a child "script" wants to start outputing, it will call startPrefixMapping before startElement (if needed).
To attain correctness, we should override startPrefixMapping as it's done in startElement.


Related, we could do the same for 

public void comment(char ch[], int start, int length)
throws SAXException {
         initialize();
      super. comment (ch, start, length);
}

to support

<x:element name="abc">
<x:comment>my comment</x:comment>
</x:element>

to generate 
<abc>
<!-- my comment -->
</abc>



-- 
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


[jira] Commented: (JELLY-217) org.apache.commons.jelly.tags.xml.ElementTag small bug in output wrapper

Posted by "Diogo Bacelar Quintela (JIRA)" <co...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/JELLY-217?page=comments#action_12319355 ] 

Diogo Bacelar Quintela commented on JELLY-217:
----------------------------------------------

| to support 
| 
| <x:element name="abc"> 
| <x:comment>my comment</x:comment> 
| </x:element> 
|
| to generate 
| <abc> 
| <!-- my comment --> 
| </abc>

Right now is generating

<!-- my comment --> 
<abc> 
</abc>



> org.apache.commons.jelly.tags.xml.ElementTag small bug in output wrapper
> ------------------------------------------------------------------------
>
>          Key: JELLY-217
>          URL: http://issues.apache.org/jira/browse/JELLY-217
>      Project: jelly
>         Type: Bug
>   Components: taglib.xml
>     Reporter: Diogo Bacelar Quintela
>     Priority: Trivial

>
> ElementTag has some small problems
> XMLOutput newOutput = new XMLOutput(output) {
>         ...
> }
> Should include
> public void startPrefixMapping(String prefix, String uri)
> throws SAXException {
>         initialize();
>        super. startPrefixMapping (prefix, uri);
> }
> startPrefixMapping is called automatically in startElement,  so whenever a child "script" wants to start outputing, it will call startPrefixMapping before startElement (if needed).
> To attain correctness, we should override startPrefixMapping as it's done in startElement.
> Related, we could do the same for 
> public void comment(char ch[], int start, int length)
> throws SAXException {
>          initialize();
>       super. comment (ch, start, length);
> }
> to support
> <x:element name="abc">
> <x:comment>my comment</x:comment>
> </x:element>
> to generate 
> <abc>
> <!-- my comment -->
> </abc>

-- 
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