[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: The illusion of simplicity and low cost in datadesign and
On Mon, 2022-08-15 at 11:49 +1000, Rick Jelliffe wrote: > I don't recall a way to say that some element's content uses a > notation, in XML. [[ A NOTATION attribute identifies a notation, declared in the DTD with associated system and/or public identifiers, to be used in interpreting the element to which the attribute is attached. ]] Notation also applies to external non-parsed entities, but in a Web environment it's the server that tells the parser, via HTTP headers, the format of the resource, and not the document author. So XML's NDATA entities are not a good fit for the Web. We don't really have an equivalent of Markdown-style ```sh #! /bin/sh echo goodbye && exit 1 ``` where the "sh" on the first line identifies (poorly) the format, e.g. for the purpose of syntax highlighting, but a notation attribute is close. The main difference is that markdown processing is suspended between the ``` marks, whereas an XML document must be well-formed even if elements declared as having an associated notation were not so declared. E.g. you can't put a stray & in element content even if it's in a declared non-XML notation. In retrospect if we'd done this better, we could have largely dispensed with CDATA sections -- <example format="xml-as-text"> <p>should be able to put anything here except an example end-tag, & not get an error</p> </example> But we didn't... liam -- Liam Quin, https://www.delightfulcomputing.com/ Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org
[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
|