[ 
https://wso2.org/jira/browse/MASHUP-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16262#action_16262
 ] 

Jonathan Marsh commented on MASHUP-755:
---------------------------------------

Clearly you tried this on Firefox.  I fixed this as well as I easily could, but 
namespaces are hard enough in XSLT, and Firefox XSLT doesn't support the 
namespace axis.  Thus one can't display arbitrary namespace declarations.  
Instead Firefox reconstructs namespaces as well as it can, by simulating 
namespace declarations when an element or attribute is in a namespace.  The 
limitations on namespaces are as follows:

1) Firefox displays namespace declarations on the element upon which the 
namespace is used (by the element itself, or by an attribute on the element).
2) Firefox doesn't display namespaces that are used in attribute or element 
content.  This is especially unfortunate when these namespaces are required by 
QNames in that content.
3) Firefox may thus move namespace declarations from parent elements to 
children elements to appear closer to where the namespace is actually used.
4) In both IE and Firefox redundant namespace declarations aren't displayed, as 
XSLT can only detect changes in the set of in-scope namespaces, not where the 
declarations appear.  This has no effect on the well-formedness or infoset 
content of the display.

In each case the display suffers only in missing namespace declarations as they 
appear in the source.  In no case are namespaces added where they weren't in 
scope in the source.  I hope this is acceptable.  The alternative is to abandon 
XSLT as a technology to generate the XML view, and recode it in Javascript, 
which is a much bigger task and IMO not really justifiable by the severity of 
the problem.

> Tryit response does not show namespaces
> ---------------------------------------
>
>                 Key: MASHUP-755
>                 URL: https://wso2.org/jira/browse/MASHUP-755
>             Project: WSO2 Mashup Server
>          Issue Type: Bug
>            Reporter: Keith Godwin Chapman
>            Assignee: Jonathan Marsh
>             Fix For: 1.1
>
>
> function addNamespace(){
>       var namespace = new Namespace("test","http://wso2.com";);
>       var test = <item><item1/></item>;
>       test.addNamespace(namespace);
>       return test;
> }
> The output of the above function is 
> <ws:addNamespaceResponse 
> xmlns:ws="http://services.mashup.wso2.org/t?xsd";><return 
> xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
>       xmlns:js="http://www.wso2.org/ns/jstype"; js:type="xml" 
> xsi:type="xs:anyType"><item xmlns:test="http://wso2.com";><item1 
> /></item></return></ws:addNamespaceResponse>
> The output shows by tryit is 
> <item>
> <item1 />
> </item>
> whereas it should have been
> <item xmlns:test="http://wso2.com";><item1 /></item>

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

        

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to