Re: The illusion of simplicity and low cost in data design and computing

"Liam R. E. Quin" <[email protected]>
Newsgroups gmane.text.xml.devel
Message-ID <[email protected]>
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

_______________________________________________________________________

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: [email protected]
subscribe: [email protected]
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.