[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: [SML] Whether to support Attribute or not?

  • From: Paul Tchistopolskii <paul@q...>
  • To: Joe Lapp <jlapp@w...>, xml-dev@i...
  • Date: Sun, 28 Nov 1999 17:28:10 -0800

interpreting sml data

> 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.

Rgds.Paul.




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



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.