Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!hal.com!halaus!jbm From: jbm@hal.com (Brad Might) Newsgroups: comp.text.sgml Subject: Re: A floating paired tag... Message-ID: <1991Jun13.135420.29128@hal.com> Date: 13 Jun 91 13:54:20 GMT References: <1991Jun12.131914.19072@hal.com> Organization: HaL Computer Systems, Inc. Lines: 78 In-Reply-To: enag@ifi.uio.no's message of 13 Jun 91 00:26:26 GMT Erik Naggum replies: > This makes sense from a perspective outside SGML, but does ISO 8879 > say so? If attributes are passed by reference, a change in a #CURRENT > attribute will reflect on outer's attribute value, also. In any case, > if #CURRENT attribute values are shared, are they so shared by the > SGML parser or the application software? If they are not shared, at > least half the point with #CURRENT is gone, as I see it, and can > produce very counter-intuitive results, although the initial thinking > seems intuitive. (SGML has some counter-intuitive specifications > which produce intuitive results for the SGML user. In general, it's > the User which has been given primary importance in the entire stan- > dard, which I find (1) extremely uncommon, and (2) extremely good.) > > | > | ha che > | > | good food > | > | kuluyuk > | > | > | ha che > | > | kuluyuk > | > | > | > | where the second kuluyuk is going to be looked upon as english > | since the last value of attribute language in element inner > | was english. > > This implies that #CURRENT attributes are not shared, which contra- > dicts my reading of the standard, and which precludes attribute value > inheritance. I agree that your example makes sense in general, but I > spent some time trying to figure out how #CURRENT works, and I think > that what makes sense in other contexts may not necessarily make sense > in SGML context. > Can you show me where you have read that #CURRENT attributes are shared amongst different elements ? I find in "The SGML Handbook": (emphasis mine) ------- Clause 4 Definitions 4.67 current attribute: An attribute whose current (that is, most recently specified) value becomes its default value. NOTE -- The start-tag cannot be omitted for the first occurrence of AN ELEMENT with a current attribute. AND Annex B B.5.2.4 Changing Default Values If the default value is specified as "CURRENT", the default will automatically become the most recently specified value. This allows an attribute value to be "inherited" by default from the previous element OF THE SAME TYPE. ------- Nowhere in the standard have I seen a mention of inheriting attribute values from elements of a different type. I do see this mentioned in "Practical SGML", but it's not the standard. brad -- - standard disclaimers apply - jbm@hal.com (Brad Might) HaL Computer Systems - (512)794-2855 8920 Business Park Dr. Suite 300 Austin, Texas 78759