[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [WS-Topics 1.3] TopicExpressions
Hi, I've got a bit of a problem with the way that wsnt:TopicExpression deals with topics and topic namespaces. Supporting multiple dialects is obviously a good thing, and defining several standard dialects is even better. Unfortunately, the content of the wsnt:TopicExpression field is a plain old string. Sure, the content depends on the dialect, but with all the standard dialects the content is an xsd:token with a very ugly regex applied to it. This makes it very difficult to work with, particularly when different namespaces are applied. XML namespace prefixes are not set in stone, and can change as XML is read and rewritten. The content of string fields, however, does not change, regardless of whether or not they are in a QName format. For instance, if you take the following XML excerpt, run marshall/unmarshall it with JaxB, it will break: <Topic Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete" xmlns:tns="myTns">tns:MyTopic</Topic> Because tns:MyTopic is a string, XML parsers treat it as such. The tns namespace therefore appears to be unused and might be discarded. Or renamed, to ns1 for instance, thus rendering the tns:MyTopic string unusable. This essentially makes working with the predefined Topic dialects a lot harder than it should ideally be. Should any updates to the Topics spec be planned, I think it might be useful if this were taken into account and that perhaps some other format is defined. If I've misinterpreted this part of the spec, feel free to rub my nose in it :-) Thanks, - Bram
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]