[ http://issues.apache.org/jira/browse/COCOON-1489?page=all ]

Jason Johnston updated COCOON-1489:
-----------------------------------

    Attachment: COCOON-1489.diff

Patch fixes issue with ill-formed result from xi:include within a fallback. The 
JUnit testcase for that functionality had a typo which is also fixed by this 
patch.

In addition, the patch fixes multiple-nested fallbacks, which did not function 
before, and a JUnit testcase was added for that.

Junit tests pass successfully, and all xinclude samples function as before.

Patch is against 2.1.x branch, but would need to be applied to trunk as well.

> [PATCH] XInclude transformer does not handle fallback correctly
> ---------------------------------------------------------------
>
>          Key: COCOON-1489
>          URL: http://issues.apache.org/jira/browse/COCOON-1489
>      Project: Cocoon
>         Type: Bug

>   Components: * Cocoon Core
>     Versions: 2.2-dev (Current SVN)
>  Environment: Operating System: All
> Platform: All
>     Reporter: Joachim Breitsprecher
>  Attachments: COCOON-1489.diff, cocoon-xinclude-transformer-patch.txt
>
> When using the <xi:fallback> element, the XInclude transformer returns a
> not-well-formed document.
> Example:
> <root xmlns:xi="http://www.w3.org/2001/XInclude";>
>   <xi:include href="this_file_does_not_exist.xml">
>     <xi:fallback>
>       <element>This should be here if the file was not found</element>
>     </xi:fallback>
>   </xi:include>
> </root>
> returns this, if the included resource does not exist:
> <?xml version="1.0" encoding="ISO-8859-1"?><root
> xmlns:xi="http://www.w3.org/2001/XInclude";>
>   
>       <element>This should be here if the file was not found
>   </xi:include>
> </root>

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

Reply via email to