You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Raymond Feng (JIRA)" <tu...@ws.apache.org> on 2006/04/28 09:08:47 UTC

[jira] Created: (TUSCANY-242) SCDL loader should trim the whitespaces when the element text is parsed

SCDL loader should trim the whitespaces when the element text is parsed
-----------------------------------------------------------------------

         Key: TUSCANY-242
         URL: http://issues.apache.org/jira/browse/TUSCANY-242
     Project: Tuscany
        Type: Bug

  Components: Java SCA Model  
    Reporter: Raymond Feng


SCDL loader should trim the whitespaces when the element text is parsed.

If I use the following SCDL section:

	<entryPoint name="InteropDocService">
		<interface.wsdl
			interface="http://soapinterop.org/#DocTestPortType" />
		<binding.ws port="http://soapinterop.org/#interopDocPort" />
		<reference>
			InteropDocServiceComponent/DocTestPortType
		</reference>
	</entryPoint>

The \t, \n will show up as follows and the lookup will fail.

targetURI= ServiceURIImpl  (id=119)
	address= "sca:////\n\t\t\tInteropDocServiceComponent/DocTestPortType\n\t\t"
	isParsed= true
	isSCAScheme= Boolean  (id=124)
	moduleComponentName= ""
	partName= "\n\t\t\tInteropDocServiceComponent"
	serviceName= "DocTestPortType\n\t\t"

Note:
The following format works fine.
	<reference>InteropDocServiceComponent/DocTestPortType</reference>


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


[jira] Resolved: (TUSCANY-242) SCDL loader should trim the whitespaces when the element text is parsed

Posted by "Rick Rineholt (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-242?page=all ]
     
Rick Rineholt resolved TUSCANY-242:
-----------------------------------

    Resolution: Fixed

http://svn.apache.org/viewcvs?rev=404910&view=rev

> SCDL loader should trim the whitespaces when the element text is parsed
> -----------------------------------------------------------------------
>
>          Key: TUSCANY-242
>          URL: http://issues.apache.org/jira/browse/TUSCANY-242
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Model
>     Versions: M1
>     Reporter: Raymond Feng
>     Assignee: Rick Rineholt
>      Fix For: M1, Mx

>
> SCDL loader should trim the whitespaces when the element text is parsed.
> If I use the following SCDL section:
> 	<entryPoint name="InteropDocService">
> 		<interface.wsdl
> 			interface="http://soapinterop.org/#DocTestPortType" />
> 		<binding.ws port="http://soapinterop.org/#interopDocPort" />
> 		<reference>
> 			InteropDocServiceComponent/DocTestPortType
> 		</reference>
> 	</entryPoint>
> The \t, \n will show up as follows and the lookup will fail.
> targetURI= ServiceURIImpl  (id=119)
> 	address= "sca:////\n\t\t\tInteropDocServiceComponent/DocTestPortType\n\t\t"
> 	isParsed= true
> 	isSCAScheme= Boolean  (id=124)
> 	moduleComponentName= ""
> 	partName= "\n\t\t\tInteropDocServiceComponent"
> 	serviceName= "DocTestPortType\n\t\t"
> Note:
> The following format works fine.
> 	<reference>InteropDocServiceComponent/DocTestPortType</reference>

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


[jira] Assigned: (TUSCANY-242) SCDL loader should trim the whitespaces when the element text is parsed

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-242?page=all ]

Jean-Sebastien Delfino reassigned TUSCANY-242:
----------------------------------------------

    Assign To: Rick Rineholt

> SCDL loader should trim the whitespaces when the element text is parsed
> -----------------------------------------------------------------------
>
>          Key: TUSCANY-242
>          URL: http://issues.apache.org/jira/browse/TUSCANY-242
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Model
>     Versions: M1
>     Reporter: Raymond Feng
>     Assignee: Rick Rineholt
>      Fix For: M1

>
> SCDL loader should trim the whitespaces when the element text is parsed.
> If I use the following SCDL section:
> 	<entryPoint name="InteropDocService">
> 		<interface.wsdl
> 			interface="http://soapinterop.org/#DocTestPortType" />
> 		<binding.ws port="http://soapinterop.org/#interopDocPort" />
> 		<reference>
> 			InteropDocServiceComponent/DocTestPortType
> 		</reference>
> 	</entryPoint>
> The \t, \n will show up as follows and the lookup will fail.
> targetURI= ServiceURIImpl  (id=119)
> 	address= "sca:////\n\t\t\tInteropDocServiceComponent/DocTestPortType\n\t\t"
> 	isParsed= true
> 	isSCAScheme= Boolean  (id=124)
> 	moduleComponentName= ""
> 	partName= "\n\t\t\tInteropDocServiceComponent"
> 	serviceName= "DocTestPortType\n\t\t"
> Note:
> The following format works fine.
> 	<reference>InteropDocServiceComponent/DocTestPortType</reference>

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


[jira] Updated: (TUSCANY-242) SCDL loader should trim the whitespaces when the element text is parsed

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-242?page=all ]

Jean-Sebastien Delfino updated TUSCANY-242:
-------------------------------------------

    Fix Version: 0.91
        Version: 0.91

It is very likely that users are going to run into this issue if they use editors that format the XML documents.

> SCDL loader should trim the whitespaces when the element text is parsed
> -----------------------------------------------------------------------
>
>          Key: TUSCANY-242
>          URL: http://issues.apache.org/jira/browse/TUSCANY-242
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Model
>     Versions: 0.91
>     Reporter: Raymond Feng
>      Fix For: 0.91

>
> SCDL loader should trim the whitespaces when the element text is parsed.
> If I use the following SCDL section:
> 	<entryPoint name="InteropDocService">
> 		<interface.wsdl
> 			interface="http://soapinterop.org/#DocTestPortType" />
> 		<binding.ws port="http://soapinterop.org/#interopDocPort" />
> 		<reference>
> 			InteropDocServiceComponent/DocTestPortType
> 		</reference>
> 	</entryPoint>
> The \t, \n will show up as follows and the lookup will fail.
> targetURI= ServiceURIImpl  (id=119)
> 	address= "sca:////\n\t\t\tInteropDocServiceComponent/DocTestPortType\n\t\t"
> 	isParsed= true
> 	isSCAScheme= Boolean  (id=124)
> 	moduleComponentName= ""
> 	partName= "\n\t\t\tInteropDocServiceComponent"
> 	serviceName= "DocTestPortType\n\t\t"
> Note:
> The following format works fine.
> 	<reference>InteropDocServiceComponent/DocTestPortType</reference>

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


[jira] Closed: (TUSCANY-242) SCDL loader should trim the whitespaces when the element text is parsed

Posted by "Rick Rineholt (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-242?page=all ]
     
Rick Rineholt closed TUSCANY-242:
---------------------------------

    Fix Version: Mx
     Resolution: Won't Fix

I understand that this would be a nice useablity feature.  However it's not clear from what I could find in the specification if ignoring the white space and crl/lf is proper behavior.  I would prefer to stay more conservative about what we accept in the SCDL than accept things we may later need to reject.  I would like to see in the SCA specification make it clear that this ok before we do this.

> SCDL loader should trim the whitespaces when the element text is parsed
> -----------------------------------------------------------------------
>
>          Key: TUSCANY-242
>          URL: http://issues.apache.org/jira/browse/TUSCANY-242
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Model
>     Versions: M1
>     Reporter: Raymond Feng
>     Assignee: Rick Rineholt
>      Fix For: M1, Mx

>
> SCDL loader should trim the whitespaces when the element text is parsed.
> If I use the following SCDL section:
> 	<entryPoint name="InteropDocService">
> 		<interface.wsdl
> 			interface="http://soapinterop.org/#DocTestPortType" />
> 		<binding.ws port="http://soapinterop.org/#interopDocPort" />
> 		<reference>
> 			InteropDocServiceComponent/DocTestPortType
> 		</reference>
> 	</entryPoint>
> The \t, \n will show up as follows and the lookup will fail.
> targetURI= ServiceURIImpl  (id=119)
> 	address= "sca:////\n\t\t\tInteropDocServiceComponent/DocTestPortType\n\t\t"
> 	isParsed= true
> 	isSCAScheme= Boolean  (id=124)
> 	moduleComponentName= ""
> 	partName= "\n\t\t\tInteropDocServiceComponent"
> 	serviceName= "DocTestPortType\n\t\t"
> Note:
> The following format works fine.
> 	<reference>InteropDocServiceComponent/DocTestPortType</reference>

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


[jira] Reopened: (TUSCANY-242) SCDL loader should trim the whitespaces when the element text is parsed

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-242?page=all ]
     
Raymond Feng reopened TUSCANY-242:
----------------------------------


By reading the spec, the "trim" action is required.

Here's the XSD from the 0.9 spec and the reference is typed by "xsd:anyURI".

   <complexType name="EntryPoint">
        <sequence>
            <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
            <element minOccurs="1" maxOccurs="unbounded" ref="sca:binding"/>
            <element minOccurs="1" maxOccurs="unbounded" name="reference" type="anyURI"/>
            <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
        <attribute name="name" type="NCName" use="required"/>
        <attribute name="multiplicity" type="sca:Multiplicity" use="optional" default="1..1"/>
        <anyAttribute namespace="##any" processContents="lax"/>
    </complexType>

Here's the type def for xsd:anyURI from the W3C XML schema:

   <xs:simpleType name="anyURI" id="anyURI">
    <xs:annotation>
      <xs:appinfo>
        <hfp:hasFacet name="length"/>
        <hfp:hasFacet name="minLength"/>
        <hfp:hasFacet name="maxLength"/>
        <hfp:hasFacet name="pattern"/>
        <hfp:hasFacet name="enumeration"/>
        <hfp:hasFacet name="whiteSpace"/>
        <hfp:hasProperty name="ordered" value="false"/>
        <hfp:hasProperty name="bounded" value="false"/>
        <hfp:hasProperty name="cardinality"
                value="countably infinite"/>
        <hfp:hasProperty name="numeric" value="false"/>
      </xs:appinfo>
      <xs:documentation
        source="http://www.w3.org/TR/xmlschema-2/#anyURI"/>
    </xs:annotation>
    <xs:restriction base="xs:anySimpleType">
      <xs:whiteSpace value="collapse"  fixed="true"
        id="anyURI.whiteSpace"/>
    </xs:restriction>
   </xs:simpleType>

Here's the rule to handle whiteSpace, for anyURI, it's collapse.

4.3.6 whiteSpace
[Definition:]   whiteSpace constrains the - value space-  of types - derived-  from string such that the various behaviors specified in Attribute Value Normalization in [XML 1.0 (Second Edition)] are realized. The value of whiteSpace must be one of {preserve, replace, collapse}. 

preserve 
No normalization is done, the value is not changed (this is the behavior required by [XML 1.0 (Second Edition)] for element content) 
replace 
All occurrences of #x9 (tab), #xA (line feed) and #xD (carriage return) are replaced with #x20 (space) 
collapse 
After the processing implied by replace, contiguous sequences of #x20's are collapsed to a single #x20, and leading and trailing #x20's are removed. 


> SCDL loader should trim the whitespaces when the element text is parsed
> -----------------------------------------------------------------------
>
>          Key: TUSCANY-242
>          URL: http://issues.apache.org/jira/browse/TUSCANY-242
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Model
>     Versions: M1
>     Reporter: Raymond Feng
>     Assignee: Rick Rineholt
>      Fix For: M1, Mx

>
> SCDL loader should trim the whitespaces when the element text is parsed.
> If I use the following SCDL section:
> 	<entryPoint name="InteropDocService">
> 		<interface.wsdl
> 			interface="http://soapinterop.org/#DocTestPortType" />
> 		<binding.ws port="http://soapinterop.org/#interopDocPort" />
> 		<reference>
> 			InteropDocServiceComponent/DocTestPortType
> 		</reference>
> 	</entryPoint>
> The \t, \n will show up as follows and the lookup will fail.
> targetURI= ServiceURIImpl  (id=119)
> 	address= "sca:////\n\t\t\tInteropDocServiceComponent/DocTestPortType\n\t\t"
> 	isParsed= true
> 	isSCAScheme= Boolean  (id=124)
> 	moduleComponentName= ""
> 	partName= "\n\t\t\tInteropDocServiceComponent"
> 	serviceName= "DocTestPortType\n\t\t"
> Note:
> The following format works fine.
> 	<reference>InteropDocServiceComponent/DocTestPortType</reference>

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