[
http://issues.apache.org/jira/browse/TUSCANY-470?page=comments#action_12416409
]
Yang ZHONG commented on TUSCANY-470:
------------------------------------
We may need to make some clarification in the SDO spec.
In general, delimiters are NOT allowed in segments unless they're encoded or
escaped. Examples are URL encoding and Java character escaping.
In this particular case, "." and "/" are SDO path delimiters, and they
shouldn't show up as property name within SDO path unless encoded or escaped.
Unfortunately, SDO spec has NOT specified the encoding or escaping. Therefore
"aaa.0" is ambiguous, even "aaa.bbb" is also ambiguous between throwing
exception (exception may be some user's expectation) and trying such property.
I don't think this's a defect. Given today's SDO spec (it may not be perfect),
people with "aaa.bbb" property shouldn't apply that property name into ANY SDO
path. Frank and I agree that's not very friendly, let's hope we can enrich the
spec from that perspective.
Thanks.
> DataObject.getXXX("aaa.bbb") throws NumerFormatException even if "aaa.bbb" is
> the XSD element name
> --------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-470
> URL: http://issues.apache.org/jira/browse/TUSCANY-470
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Versions: Java-M1
> Reporter: Raymond Feng
> Assignee: Frank Budinsky
>
> In my XSD, I have an element named as "aaa.bbb" which is contained by a
> complexType foo.
> <complexType name="foo">
> <element name="aaa.bbb" type="xsd:string"/>
> <complexType>
> Now I have an instance of foo as a DataOject and when I try to retrieve the
> property using the following code:
> String value = fooDataObject.getString("aaa.bbb");
> I'll get a NumerFormatException. Obviously, the SDO runtime is confused and
> treats "aaa.bbb" as a XPath expression.
> I'm not sure what the SDO spec says. Maybe we should do some checking or
> require such property name to be escaped like "aaa\.bbb"?
> Thanks,
> Raymond
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]