[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: [SML] Comments ( Whether to support Attribute or not? )
From: Rick Jelliffe <ricko@a...> > From: Don Park <donpark@d...> > > >I believe it is now time to address the question of > >whether Attribute should be supported in SML or not. > > Because it is convenient for programming. I think it is not. It may be convinent for writing the document, but it introduces especial syntax for *processing* the document. It's similiar to ... If we require in, say, C++ to use a = B; // B is variable a $= B; // B is constant > It seems that most XML programs are written so that > the elements "push" programs but attributes values > are "pulled" in. So the programmer does not need > to concern themselves with attributes that are redundant > to their task. To make everything an element would > reduce the choices available to a programmer. I don't understand. I simply don't understand. Well ... maybe you are saying that removing the kludge from a $= B redices some choices ... Maybe it does. It's the issue of taste, I think. However, it's very common thing when something designed to be a constant becomes a variable ( and back ). I already experienced the same things with attributes and elements. > Are you talking about syntax or labelling here? You can > see that some people say "lets remove attributes and > have '<sml:attribute>' instead". I missed the original letter, suggesting such a thing.... I don't think it is reasonable. I think it's better to drop attributes, even they are very handy kludge - I think the cost is not worth it ( it was worth it in SGML, I think ). > Others say "lets > remove comments and have 'comment' instead". This is > not a simplification at all: the handling of these > has to be handled by subsequent layers 1. It *is* some simplification. 2. It makes the step forward. Comments are considered to be the part of the content. Is it strong suggestion? Yes. Is it for sure wrong? I don't think so - so I'm writing a bit more on it, sorry if it would somtimes be not exactly about the comments, but I hope it is. Actualy, Java already did the half-step in that direction, with javadoc. People enjoyed comments to become *more* than some verbal junk. Current situation with comments in XML ( and XML APIs) is very strange. On one hand they are part of the content ( DOM works with them ) on another hand they are not ( SAX v 1.0 does not ). Inconsistensy. Isn't it ? > (or, worst, by > the programmer explicitly: will we have to put in > comment { display: none } > sml:attribute {display: none} > into every CSS stylesheet? Unfortunately, for some reason I like XSL FO more than CSS, but I actualy see no big problem placing comment { display: none } into every stylesheet. I am *already* required to place many things into XSLT stylesheets, and also I place #include <stdio.h> and use strict. It does not hirt me. But. Maybe it would be handy to change current behaviour to ( 'what is not declared - is not processed' ). I mean that most of existing XML-related tools are dumping out everything they find in XML document if there is no command/instruction not to dump it. I don't think it is good. It could be better to tune this behaviour with default { something } ( if default is not defined - it is 'none' ;-) I don't like HTML browsers 'silently fixing' my HTML, I don't like compilers silently initializing my variables to 0 and stuff like that. If it is not decalred - don't initialize it. If it is not set for being drawn - don't draw it, because if you do ( like current HTML browsers do ) - it gives the user an impression that everything is fine in the situation when everything is *not* ( like it is with initialization with 0 ). Unfortunately, it is a bit not related to the comments, but I just had to say that things could be done in a bit different way with comments ( so you will have no need to write especial rule for comments. Or you will need only if you decided to write default: { 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|