xsl-list
[Top] [All Lists]

Re: [xsl] Adding entity declarations to DOCTYPE in xml output

2019-02-26 16:46:47
On Tue, 2019-02-26 at 21:53 +0000, Eliot Kimber ekimber(_at_)contrext(_dot_)com
wrote:
That general requirement (simple string macros) can be satisfied
using XInclude, which is implemented by most, if not all, of the
modern XML parsers.

Pretty much. It's unfortuate that we never added control over XInclude
processing to the doc() function in XPath/XQuery/XSLT/...

I could go farther and say that the original SGML design of DTDs was
entirely misguided as well and should never have been done that way
and certainly shouldn't have been carried into XML (again, I
certainly argued *for* them at the time)

It's questionable as to have far from SGML we could have taken XML and
had it go anywhere. As it was for a while i was getting daily calls
from someone called Charles opposed to making DTDs optional :-)


 but that's easy for me to say now. At the time that SGML was being
defined and implemented the DTD syntax seemed perfectly sensible and
it took a long time for us to recognize the inherent problems with
DTDs as they exist in SGML and XML.

In particular, because they are a purely syntactic mechanism DTDs are
a security risk and provide no reliable declaration of the actual
semantic document type of the document that exhibits the DOCTYPE
declaration.

You're right - public identifiers do *not* do what many people think,
and neither does a DOCTYPE declaration. A combination of a namespace
URI and a version attribute seems better, but is still not perfect.

It always bugged me that SGML DTDs didn't guarantee a particular root
element. Yuri’s take was to point out that he could write a book
starting with a single paragraph and working outwards, and have the
document remain DTD-valid at all times. But that just says that SGML
needed a separate concept of document-valid alongside what-you-have-
here valid.

Liam


-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Web slave for vintage clipart http://www.fromoldbooks.org/
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>