Re: xml comment syntax
Carlo Capelli <[email protected]> Thu, 7 Aug 2014 22:03:23 +0200
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CABty9wwKLdt2t7Kyr1DSOD0CY522k9twjiVUCmySPMu_+qx+EA@mail.gmail.com> |
Thanks Jan seems that W3C reference <http://www.w3.org/TR/REC-xml/#dt-comment> (I hope this is the standard) is more explicit, and agrees with the Wikipedia entry. Therefore I read the comment as correct... anyway, it's an irrelevant quirk, thea2 unit tests offer much more funny things than this small problem. bye Carlo 2014-08-07 21:35 GMT+02:00 Jan Wielemaker <[email protected]>: > On 08/07/2014 09:16 PM, Carlo Capelli wrote: > > Well, really of little importance, but I can't determine if this is > really > > an error: > > > > <!--- Replaced so that we have a unionOf construct > > Aug 20 02 MKS, suggestion by R. Volz. > > > > <owl:Class rdf:ID="Fruit"> > > <rdfs:subClassOf rdf:resource="#EdibleThing" /> > > </owl:Class> > > > > --> > > > > as reported while running thea2 unit tests: > > > > Warning: Unknown file-extension: . Assuming RDF/XML > > > > ERROR: SGML2PL(xmlns): > > http://www.w3.org/TR/2003/PR-owl-guide-20031209/food:869: Illegal > comment, > > found "<!---" > > > > % Parsed "http://www.w3.org/TR/2003/PR-owl-guide-20031215/food" in 0.06 > > sec; 954 triples > > > > > > wikipedia <http://en.wikipedia.org/wiki/XML#Comments> informal > description > > seems suggest that should be valid... > > The WikiPedia text is not very explicit. The code is (parser.c in sgml > package) > > case S_CMT1: /* <!-- */ > { if ( f[CF_CMT] == chr ) /* <!--- */ > { if ( IS_XML_DIALECT(dtd->dialect) ) > gripe(p, ERC_SYNTAX_ERROR, L"Illegal comment", L"<!---"); > } > p->state = S_CMT; > return TRUE; > } > > It is long ago, but it seems I programmed this quite deliberately (I > think it > should be a warning; the parsing just accepts it as a comment). So, I'll > leave the search for whether or not this is allowed to you :-) And I'll > only accept references from the official XML standard or approved XML > test cases. There are plenty incorrect claims floating on the web ... > > Cheers --- Jan > -------------- next part -------------- HTML attachment scrubbed and removed