[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RAN - Raw Access Notation
On Fri, Aug 6, 2021 at 3:51 PM Marcus Reichardt <u123724@gmail.com> wrote: Hi Rick, And the end-tag can contain any text after it, treated as a comment. </bar whatever this is supposed to be> In RAN, tags can start lexically with any of the tokens: a string in "", a name, a number, a date, a url, true or false. (If any of these are to be disallowed, that takes place at the parser level, not the token level.) So this allows an element with an empty string as its name e.g. <""> Hello <x>W</x>orld </"" > And this in turn allows some lexical sugar <[ Hello <x>W</x>orld ]> So what use is an element with an empty string for a name? An array, for example. Now I'm not entirely sure why end-element tags as they are even made For two reasons, at least: First, because it makes it explicit what is actually ending at some point: remembering that in marked-up documents, the end-tag may be tens of thousands of tags away from its start-tag, for large documents. This makes it easier for humans. Second, because it scopes where an error is detected. There is always an issue that missing-end-tag errors are reported where they are detected, not where they occur. Having an explicit name means that the scope of where the missing end-tag could have been is scoped to the parent of the start-tag, not beyond it (as would be the case of </>). So I think explicit end-tags do serve a good purpose. but Yes, I guess my method of allowing everything that is simple and does not compromise lexing leans in favour of </> doesn't it? Hmmm. On the other hand, there is no point in being able to start from any point and be lexing as soon as you find a < or >, yet not be able to parse from there: if we find a </> we don't know what it is, and we have to go back to find it (back from where we are or forwards from the start of the last milestone, i.e. the last fragment start, or potentially the start of the document. So I am really not sure about it. There is also a compromise: it can only be used for leaf elements, i.e. the lexer could fill in the name with only a stack of 1, i.e. a variable, or only have to scan back to the last < to find it.
I am not sure that it would be good enough: it might cause frustration that if you want to add a subelement of i, you have to close off that before adding the new one. Lack of empty end-tags is particularly verbose as XML doesn't support IIRC correctly, CONCUR was only implemented two or three times in general SGML parsers, and there was some incompatability arising from disputed interpretation of the standards. (Do I recall correctly that OmniMark did it one way, and ARC did it another, and James Clark thought it was a coin toss (or that IS8879 needed to be clarified): maybe to do with "whitespace attributable to markup" differing...? I never used CONCUR, but I get the impression it didn't quite do what it was supposed to, and that milestones using PIs ended up being more flexible?) Regards Rick
[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
|