[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML2.0: Comments (Was: Towards XML 2.0)
Initially I liked the <xml:comment>....</xml:comment> idea, but I now agree with Greg that comments should allow non well-formed data. Since a comment looking like an element would suggest it was well-formed, I think a non-element style format should be used. Tweaking XML 1.0 comments seems sufficient rather than a wholesale replacement. I really like the idea of nesting comments though, so you could do: <!-- Ignore this until I fix it -- <MyElement> <!-- The price is changed by the controller --> <price>100.00</price> </BrokenMyElement> <!-- Is this the problem? --> --> Pete Cordell Codalogic Ltd Interface XML to C++ the easy way using C++ XML data binding to convert XSD schemas to C++ classes. Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com for more info ----- Original Message ----- From: "Greg Hunt" <greg@firmansyah.com> To: "Michael Sokolov" <sokolov@ifactory.com> Cc: "XML Developers List" <xml-dev@lists.xml.org> Sent: Sunday, December 05, 2010 9:38 AM Subject: Re: Towards XML 2.0 You need comment parsing to be at the same logical level (but different to) the element parsing, like it is today so that you can have arbitrary content in comments. Why try to make comments part of the XML structure? Imagine requiring semicolons on the ends of comments in other languages because the designers wanted comments to look like statements in the language. I suspect some of the problems with XML (for example the odd limits on what can be in a comment), and with schema (some of the parsing limits), are a recurrence of the elevator controllers that plagued an earlier programming language specification effort. Elevator controllers were sometimes used as a justification for limits on language specifications in areas such as memory usage, IO behaviour and the like, they were used as examples of extremely limited environments that could not handle complex processing. On Mon, Dec 6, 2010 at 2:22 AM, Michael Sokolov <sokolov@ifactory.com> wrote: > Good point. Perhaps I'd be willing to accept having to write > xml-well-formed > comments. My main concern is with being able to "disable" (comment out) a > large portion of a well-formed document without having to be concerned > whether it contains comments or not. In that case, comments would be > well-formed, so not an issue really. > > -Mike > > On 12/5/2010 4:10 AM, Greg Hunt wrote: >> >> So you are suggesting that something that looks like an element is >> parsed differently to other things that look like elements? Is "can't >> expect well-formedness" entirely wise? >> >> On Mon, Dec 6, 2010 at 1:48 AM, Michael Sokolov<sokolov@ifactory.com> >> wrote: >>> >>> On 12/4/2010 10:39 PM, Ben Trafford wrote: >>>> >>>> On Sat, 2010-12-04 at 22:16 -0500, Kurt Cagle wrote: >>>>> >>>>> For a comment syntax, what's wrong with >>>>> <xml:comment>....</xml:comment>? >>>>> >>>>> But that's ... that's ... >>>>> >>>>> >>>>> That's actually a very decent idea. >>>> >>>> I'll third that. >>>> >>>> --->Ben >>> >>> metoo, but let's please allow for nesting this time. Extremely useful, >>> and >>> not too hard to implement if you parse the contents of the comment >>> loosely >>> (can't expect well-formedness, but can just search for</xml:comment\s*>) >>> >>> -Mike >>> >>> _______________________________________________________________________ >>> >>> XML-DEV is a publicly archived, unmoderated list hosted by OASIS >>> to support XML implementation and development. To minimize >>> spam in the archives, you must subscribe before posting. >>> >>> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ >>> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org >>> subscribe: xml-dev-subscribe@lists.xml.org >>> List archive: http://lists.xml.org/archives/xml-dev/ >>> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php >>> >>> > > _______________________________________________________________________ XML-DEV is a publicly archived, unmoderated list hosted by OASIS to support XML implementation and development. To minimize spam in the archives, you must subscribe before posting. [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ Or unsubscribe: xml-dev-unsubscribe@lists.xml.org subscribe: xml-dev-subscribe@lists.xml.org List archive: http://lists.xml.org/archives/xml-dev/ List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
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
|