[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: 30 years of SGML (ISO 8879)
> I was around, but not in the SGML world! Young grasshopper (; (sorry couldn't resist; seriously I appreciate the work You have done over the years; Your StackOverflow articles and website, as well as Dave's, Jenni Tennison's, Dimitri's, and many others, helped me numerous times with XLST etc. in the past; btw. is the "old guard" from the SGML times still around here?) > Would this give both validating and non-validating parsing modes for XML? Yes, as explained in the other post. sgmljs uses IMPLYDEF ELEMENT YES by default (in the absence of an SGML declaration); this means it will accept wellformed markup only and it will validate elements to the extent that they are declared in the DTD (if the instance has a DTD at all). So this gives a non-validating parsing mode. When IMPLYDEF ELEMENT NO is activated in an SGML declaration, then, in addition, sgmljs will validate element contents against content models and reject undeclared elements (and attributes and notations etc.). So this gives a validating parser. Also, FEATURES MINIMIZE SHORTTAG STARTTAG NETENABL (http://sgmljs.net/docs/libsgml-js/Sgmldecl.html#features_minimize_shorttag_starttag_netenabl), FEATURES OTHER KEEPRSRE, and FEATURE MINIMIZE EMPTYNRM are influential for XML processing. If processing an XML file on the command line, these settings will be set automatically according to the filename suffix; if processing an XML stream in sgml-ua.js (the in-browser SGML parser/processor), these should be enabled by a HTTP response's text/xml MIME type. By default, sgmljs is designed to parse HTML5 with a built-in minimal DTD activated by <!DOCTYPE html PUBLIC "about:legacy-compat"> containing just element declarations for elements having EMPTY declared content (so that "missing" end tags are accepted in HTML, such as in "<meta ...>" elements); eventually, the built-in DTD should also contain attribute declarations for HTML5's "boolean" attributes (such as "<input enabled>" and the few other cases where HTML5 makes use of MINIMIZE ATTRIB OMITNAME). On Mon, Oct 24, 2016 at 11:42 AM, Michael Kay <mike@saxonica.com> wrote: > (Going back on list) > >> On 24 Oct 2016, at 10:12, Dave Pawson <dave.pawson@gmail.com> wrote: >> >> xml.dcl from James Clark may help Mike. >> I'd assumed you were around in SGML days? >> > > I was around, but not in the SGML world! > > Would this give both validating and non-validating parsing modes for XML? > > Michael Kay > Saxonica > > > > _______________________________________________________________________ > > 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: xml-dev-unsubscribe@lists.xml.org > subscribe: xml-dev-subscribe@lists.xml.org > List archive: http://lists.xml.org/archives/xml-dev/ > List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
[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
|