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/05/07 23:29:24 UTC
[jira] Reopened: (TUSCANY-242) SCDL loader should trim the
whitespaces when the element text is parsed
[ 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