Marius,
The prime purpose of
Attributes is its usage like a key so the usage of XSD:int/long etc is
perfectly fine (like an Object ID or key). If a String is going to be
used then the whitespaces in the string if any should be insignificant.
The second point that you raised is a good
one – attributes have a smaller foot print than elements – so we
should use attributes for smaller footprint if the data that’s going to
be stored in the attribute is smaller in size. (plus other design issues)
Thanks,
Guru
-----Original Message-----
From: hyades-dev-admin@xxxxxxxxxxx
[mailto:hyades-dev-admin@xxxxxxxxxxx] On
Behalf Of Marius Slavescu
Sent: Monday, October
18, 2004 2:37 PM
To: hyades-dev@xxxxxxxxxxx
Subject: RE: [hyades-dev] HCE
protocol in XML
Hi Guru,
Do
you see any problem in using attributes for XSD primitive types (int, long etc)
or XSD.string when it is clearly stated that should not be used for BLOBs or
structured text?
In
a protocol spec any bit matters, so I believe "required" should be
used only were it is really needed, also attribute has a smaller footprint then
element for the same content so we should use attributes wherever we can (as
you noted in some cases it is not appropriate).
Thanks !
Marius
"Nagarajan, Guru"
<guru.nagarajan@xxxxxxxxx>
Sent
by: hyades-dev-admin@xxxxxxxxxxx
10/18/2004 02:22 PM
Please
respond to
hyades-dev
|
|
To
|
<hyades-dev@xxxxxxxxxxx>
|
cc
|
|
Subject
|
RE: [hyades-dev] HCE protocol in XML
|
|
Andy,
My inputs:
a) Attributes can occur only once and are optional by default, to make
the schema more verbose it is good to tag it mandatory. If the need to modify
the XML schema to add multiple occurrences of an attribute does not exist then
it is safe to use attributes. (use=required for the attribute)
<xsd:complexType
name="DeregisterAgent">
<xsd:attribute
name="agentID" type="xsd:int”
use=”required”/>
</xsd:complexType>
b) By default XML processors
normalize attributes but not elements– the data in attributes
could change depending on the processor, if the XML data stream is not going to
be used by any other tool then attributes is fine.
Thanks,
Guru
-----Original
Message-----
From: hyades-dev-admin@xxxxxxxxxxx
[mailto:hyades-dev-admin@xxxxxxxxxxx] On
Behalf Of Marius Slavescu
Sent: Thursday, October 14, 2004 9:33 AM
To: hyades-dev@xxxxxxxxxxx
Subject: Re: [hyades-dev] HCE protocol in XML
Hi Andy,
Just some quick observations on the modeling style, I would capitalize all the
type names and also use attributes instead of elements where the type is a
primitive type or xsd:string.
For example:
<xsd:complexType name="deregisterAgent">
<xsd:element name="agentID"
type="xsd:int>
</xsd:complexType>
would become:
<xsd:complexType name="DeregisterAgent">
<xsd:attribute name="agentID"
type="xsd:int>
</xsd:complexType>
Also xsd:element when declared in a type has to be embedded in a group like
sequence, choice etc.
Thanks !
Marius Slavescu
"Kaylor, Andrew"
<andrew.kaylor@xxxxxxxxx>
Sent by: hyades-dev-admin@xxxxxxxxxxx
10/13/2004 07:38 PM
Please
respond to
hyades-dev
|
|
To
|
<hyades-dev@xxxxxxxxxxx>
|
cc
|
|
Subject
|
[hyades-dev] HCE protocol in XML
|
|
I’ve attached a first draft rough sketch of how I think the HCE protocol (as
otherwise described in the HCE Protocol Specification document that I’ve
sent out in multiple drafts) might be implemented.
I don’t expect a formal review of this tomorrow, but it would be helpful
if everyone could take a look at it so we can talk about basic impressions.
-Andy