[SML] Whether to support Attribute or not?

Paul Tchistopolskii paul at qub.com
Mon Nov 29 01:27:30 GMT 1999

> I understand the problem better after reading other people's responses.
> What threw me was the analogy to object data and behavior, which I don't
> think is the right analogy.
> In each of these example elements
>   <lineitem><model>XYZ</model><quantity>3</quantity></lineitem>
>   <lineitem quantity="3"><model>XYZ</model></lineitem>
>   <lineitem quantity="3">XYZ</lineitem>
> 'lineitem' has two properties: model and quantity.  It happens that in the
> last example the model is not labelled 'model'.  The label is missing,
> since strictly speaking XYZ is not the lineitem.
> If we throw away the quantity attribute we are left with...
>   <lineitem>XYZ</lineitem>
> XYZ may indeed represent the line item, but we could have chosen a more
> specific word...
>   <model>XYZ</model>
> I'd argue that if an element has attributes in addition to text content,
> then the attributes together with the content define the element, and the
> content must therefore be yet one more property of the element.  The
> property simply has not been named.

.... I think, <PCDATA> could be a name of such a  'hidden property' property ? ;-)
> You might consider that a shortcoming of XML.  

I don't understand where is a shortcoming here .... I think nobody knows 
for sure what will happen with some 'plain' PCDATA field in the future - it 
may easily become mixed content, so considering PCDATA to be 
a special case of mixed content looks reasonable and consistent to me.

But I agree, when you have PCDATA but  *not*  mixed content it usualy 
means that you'l better to specify some new element / attribute ... 
Do I understand your point ? 

I don't  understand  what to do with such a knowledge ... 

> By allowing attributes it allows elements to have unnamed properties.  
> I'm having trouble interpreting this as an advantage that attributes give.  

> Were there never attributes, every property would have a label.  

> (Unless there is mixed content, which prompts my next thread...)
> I think the solution for SML/XML conversion is give this property an
> explicit name.

What is the *problem* you want to solve ?

<lineitem><quantity>3</quantity>XYZ</lineitem> is valid XML and 
valid SML as well.  

Or I'm missing something in SML ?

Or you are saying PCDATA should be restricted from SML, and 
only mixed content should remain?

What is the purpose ? ... Actualy, maybe there is some .... 
I don't want to drop mixed content from SML. It will 
kill the markup abilities and I don't see any reasons why 
it should be killed.  Maybe I'm missing something here.


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)

More information about the Xml-dev mailing list