[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [dita] Question about xml mention domain
A Freemarker directive/macro looks like this in use: <@directiveName att="value"> Content goes here </@directiveName> So when documenting them in DITA, we generally use <xmlelement>@directiveName</xmlelement>. You’re not wrong that the best solution would be a <markupname> specialization, but this is already there and works well enough, so hasn’t been
worth the extra effort. Lots and lots of languages and toolchains use elements and attributes – HTML, SGML, PHP, JSP, ASP, etc. I feel pretty strongly – now that they’re out there and I’ve had some time to get used to them – that tying the element and attribute
mention elements too closely to XML is artificially limiting. Chris From: Eliot Kimber <ekimber@contrext.com> Certainly my intent with the domain was specifically to identify mentions of XML constructs.
The base markup name domain can be used as the base for elements intended to identify names in other, non-XML, contexts. Would it make sense, for example, to have Freemarker directive name presented as “<name>”? That is the normal (default, expected) presentation of the <xmlelement> element. Cheers, E. -- Eliot Kimber http://contrext.com From: Chris Nitchie <chris.nitchie@oberontech.com> Do the elements need a prefix? I’ve used <xmlelement> and <xmlatt> to describe elements and attributes in markup languages that aren’t XML – usually HTML, but also things like Apache Freemarker directives. I think <element> and <attribute>
are probably too generic, but I’d prefer names that weren’t bound so tightly to XML. Chris From: <dita@lists.oasis-open.org> on behalf of Eliot Kimber <ekimber@contrext.com> Hmm, the XML spec does seem to be clear: “Names beginning with the string "xml", or with any string which would match
(('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization in this or future versions of this specification.” https://www.w3.org/TR/xml/#sec-well-formed So the element types “xmlelement”, “xmlatt”, “xmlnsname”, and “xmlpi” would appear to be technically non-conforming. However, I find it interesting that no-one (myself included, who certainly should have remembered this aspect of the XML
spec since I was a member of the XML Working Group) and no XML parser has ever flagged this, so it’s clearly not enforced. Likewise, with the advent of namespaces, the need to reserve local names is largely removed so the actual practical value of this aspect
of the XML spec is minimal. That said, it would probably be appropriate to correct this in DITA 2.0. An easy fix would be to replace “xml” with a domain-specific prefix, e.g. “xd”, and add that prefix to the other element type names in the domain. But since it clearly causes no actual practical problems as far as we know, I don’t see a need to do anything for DITA 1.x. Cheers, E. -- Eliot Kimber http://contrext.com From: <dita@lists.oasis-open.org> on behalf of Jang Graat <jang@jang.nl> After putting a picture of my self-designed <XMLennial/> T-shirt on FB, it was brought to my attention that this element name is invalid, as it starts with “xml”. I checked this on W3schools and the remark seems to be correct, unless there
have been changes to the standard or its interpretation. Any tag name is legal except when it starts with either ‘xml’, ‘XML’, ‘html’ or ‘HTML’. What does this mean for the tag names in the XML mention domain? If these are illegal against the XML syntax we have a problem, which would have to be corrected for DITA 2.0. Kind regards Jang F.M. Graat |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]