Legacy Issue Number: 19449
Source: Real-Time Innovations ( Gerardo Pardo-Castellote)
The specification documents are all under the namespace: http://www.omg.org/spec/DDS-WEB/20131122
Whereas the XSD documents use targetNamespace that use different prefixes:
webdds_rest1.xsd sets targetNamespace="http://www.omg.org/spec/WEBDDS/20130601/"
webdds_soap1_types.xsd sets targetNamespace="http://www.omg.org/webdds/"
webdds_soap1.wsdl sets targetNamespace ="http://www.omg.org/spec/WEBDDS/20130601/
webdds_soap1_notify.wsdl sets targetNamespace ="http://www.omg.org/spec/WEBDDS/20130601/
While this is technically allowed it is likely to cause confusion because the xmlns used in an XML must match the targetNamespace of the referenced XSD.
For this reason it would be better that the three targetNamespace are consistent. For example, assume that the result of the FTF has the machine-readable documents under the URL prefix:
Then the XSD documents should all use the same target namespace "http://www.omg.org/spec/DDS-WEB/20140901/"
Note that it is allowed for multiple schemas to have the same targetNamespace and it is one of the recommended practices when all the schemas are conceptually related and there is no need to separate identify the origin/lineage of each element.
Reported: DDS-WEB 1.0b1 — Wed, 4 Jun 2014 04:00 GMT
Disposition: Resolved — DDS-WEB 1.0
Resolve by updating the schema file webdds_rest1.xsd and the non-normative example file webdds_rest1_example.xml
This issue is addresses by updating the XSD shema file (webdds_rest1.xsd ) and the the non-normative example file webdds_rest1_example.xml
The two files are attached. Replacing this two files is the only change to the specification to address the issue.
What follows is the detailed description of the changes performed to those files and the reasons for them.
- To increase the usability of the XSD the namespaces and imports should be re-organized. The webdds_rest1.xsd schema declaration should be modified to use http://www.omg.org/dds/ as the target namespace. The result should be as follows:
- The import of DDS_QoSProfile.xsd in the webdds_rest1.xsd should be changed to a “include”.
Also note the issue filed to change the definition of elementName:
This issue also impacts the XML files associated with that schema file should be modified accordingly.
- The root element for webdds_rest1_example.xml and elements xmlns, xmlns:dds, xmlns:xtype, and xsi:schemaLocation should be modified to match what is shown below:
- Consistently follow snake_case naming convention for the element names in the XSD. Rename all CamelCase to snake_case for the XSD elements. The XSD types can remain in CamelCase. This renames webdds_rest1.xsd XSD elements:
sourceTimestamp, instanceHandle, validData, instanceState, sampleState, viewState, readSampleInfo, sampleData, writeSampleInfo, returnCode, returnMessage, accessToken, sessionId.
source_timestamp, instance_handle, valid_data, instance_state, sample_state, view_state, read_sample_info, sample_data, write_sample_info, return_code, return_message, access_token, session_id.
- Consistently use lower case for all type definitions in the XSD with CamelCase convention.
This rename webdds_rest1.xsd XSD types:
RegisterType, Topic, TopicList, DataWriter, DataWriterList, DataReader, DataReaderList, Publisher, PublisherList, Subscriber, SubscriberList, DomainParticipant, DomainParticipantLibrary, StatusCondition, ReadCondition, ContentFilter, ParameterList, Waitset, ReturnStatus, Application, AuthenticatedSession
registerType, topic, topicList, dataWriter, dataWriterList, dataReader, dataReaderList, publisher, publisherList, subscriber, subscriberList, domainParticipant, domainParticipantLibrary, statusCondition, readCondition, contentFilter, parameterList, waitset, returnStatus, application, authenticatedSession
- Introduce the following new definition on the webdds_rest1.xsd XSD:
- Change the type of the “_ref” attributes (type_ref, register_type_ref, topic_ref), from “dds:elementName” to “elementNameReference”.
Change the type of the “base_name” attribute on element domainParticipant to “elementNameReference”.
- Change all type attributes in the elements of webdds_rest1.xsd that refer to types defined in DDS_QoSProfile.xsd. Currently all these references have the prefix “dds:” drop that prefix since the target namespace is now the same. Effectively this removes all the “dds:” from the values of the “type=” attribute.
- Rename the webdds_rest1.xsd XSD types “Sample” and “SampleSeq” to “readSample” and “readSampleSeq” also changing the definition of “Sample” to use “xs:any” and “data” as an element name so the the type “xs:Sample” becomes:
- Add the following definitions to the webdds_rest1.xsd XSD:
- Modify the definition of application to match what follows. Remove unused type authenticatedSession from webdds_rest1.xsd
- Add types qosLibraryList, qosProfileList, applicationList, domainParticipantList, to webdds_rest1.xsd
- Add types dataset and datasetLibrary to the webdds_rest1.xsd XSD.
- Modify webdds_rest1.xsd XSD as follows
Rename element “restdds” to “dds”
Modify the type “dataReader” moving the documentation annotation on the “query_condition” element to the “content_filter” element.
Rename the type “contentFilter” to “filter” and modify documentation accordingly
Remove the type definitions for instanceState, viewState, and sampleState. Change references the these types in type readSampleInfo to instanceStateKind, viewStateKind, and sampleStateKind, respectively. Change also readSampleInfo type so that so that minOccurs of any of the child elements 0 instead of 1. The resulting readSampleInfo type should match this:
Modify the definition of the “registerType” type adding a “format” attribute.
- Modify the definition of element “condition” within type “waitset” adding an intermediate “waitsetCondition” type that is just a reference to a condition. The added waitsetCondition and modified waitset is:
- Modify the restdds element of webdds_rest1_example.xml to include the additional children and also to refer to the xtypes:types element directly. The resulting element is:
- Modify the non-normative webdds_rest1_example.xml to match the changes in the XSD. Also add example use for more of the elements defined in the XSD, this means adding examples for qos_library, dataset, waitset_library. Also change the type “ShapeType” to be inside a module.
Updated: Tue, 22 Dec 2015 15:08 GMT