Common Desktop Interface Specification (aka CDIS), initial work

Timo Stuelten t.stuelten at tu-bs.de
Sun Jan 23 14:34:59 EET 2005


Hi!

> I created an XML Schema (xsd file) for the document(s) too, and some
> small XSLT file to display the interface in some "readable" way.
> I am aware of the fact the XSL and XSD probably look horrible, I'm no
> XML guru.
Some minor questions from a XML beginner ;)

Can an argument's type be specified as attribute? This way arguments may 
be specified a little bit more compact:
<cdis:Arguments>
  <cdis:Argument cdis:id="1" cdis:name="Uri" cdis:Type="String"/>
  <cdis:Argument cdis:id="2" cdis:name="Para2" cdis:Type="String"/>  
  <cdis:Argument cdis:id="3" cdis:name="Para2" cdis:Type="Integer"/>
</cdis:Arguments>

Is it possible to extend the type enumeration ("Bool", "String", 
"Integer") without a new version of the standard-schema? Why not use (a 
subset of) the XSD type system?

Should the service description be separated from the interface 
description? The xml-file describes the service "CdisMusicPlayer" which 
supports the interface "org.freedesktop.CDIS.MusicPlayer". Will another 
service X supporting the same interface declare that interface again? 

I thought of something like this instead:
For a service:
<DesktopService name="CdisMusicPlayer">
  <SupportsInterface>org.freedesktop.CDIS.MusicPlayer<SupportsInterface/>
  ... maybe some more ...
<DesktopService/>
and another file for the interface:
<Interface cdis:name="org.freedesktop.CDIS.MusicPlayer" ...>
  <cdis:Description>...<cdis:Description/>
  <cdis:ExposedEvents>...<cdis:ExposedEvents/>
  ... the remaining interface definition ...
</Interface>


BTW: I think you don't want to allow multiple types for an 
argument, like this:
<cdis:Arguments>
  <cdis:Argument cdis:id="1" cdis:name="Uri">
    <cdis:Type>String</cdis:Type>
    <cdis:Description>The URI of ...</cdis:Description>
    <cdis:Type>Integer</cdis:Type>
    <cdis:Description>...</cdis:Description>
  </cdis:Argument>
</cdis:Arguments>
Especially with only 3 different types I see no benefit in this ;)
Maybe I'm reading the schema wrong, but I think the sequence inside  
"MethodValue" would allow that. Instead:
<xsd:complexType name="MethodValue">
  <!-- no sequence here -->
  <xsd:element name="Type" type="Type" />
  <xsd:element name="Description" type="xsd:string" />
  <xsd:attribute name="id" ... />
  <xsd:attribute name="name" ... />
</xsd:complexType>
(Would "Parameter" be a better name for "MethodValue"?)


And maybe some beautification for the the schema location?
'.../CDISInterface.xsd' instead of '.../CDIS CdisInterface.xsd'?


regards,

-Timo-

-- 
------------------------------------------------------------------------
Timo Stuelten
mailto: t.stuelten at tu-bs.de



More information about the xdg mailing list