[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)

  • From: "Pete Cordell" <petexmldev@codalogic.com>
  • To: "Greg Hunt" <greg@firmansyah.com>,"Michael Sokolov" <sokolov@i...>
  • Date: Sun, 5 Dec 2010 11:01:55 -0000

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!

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.