[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: 30 years of SGML (ISO 8879)
Yes. It has even support for DSDL-9 (http://www.iso.org/iso/catalogue_detail.htm?csnumber=41009) to normalize namespaces. What this means is that if a DSDL-9 namespace declaration PI is present in the DTD (binding a canonical namespace prefix to a namespace URI), sgmljs will treat an element name as if it contained the canonical namespace prefix when the element has the respective xmlns namespace (sgmljs will rename an element "x" to "ns:x"; there's no distinction of namespace prefix and localname in SGML). sgmljs can understand the official SGML declaration for XML 1.0 (see http://sgmljs.net/docs/sgmlrefman.html#sgml-declaration) but it will only accept UTF-8. It is designed to parse and process XML DTDs as SGML DTDs, meaning it isn't restricted to XML's content model restrictions wrt. PCDATA and will handle a superset of XML's declaration syntax. It has support for the "allgroup" content model compositor which XML lacks but XSD has re-introduced (but please note that using allgroups brings about an exponential blow-up of internal automaton tables, which is is why it's restricted to at most 5 content tokens right now -- this should eventually be configurable by CAPACITIES in the SGML declaration; also sgmljs has it's own restrictions wrt. what operands can appear in allgroups). It will also warn about things such as entity references lacking a closing semicolon (required for XML but not SGML), when processing a file that has the SGML declaration for XML (or when processing an ".xml" file when run from the command line). sgmljs is specifically written to support an XML profile wrt. to its support of the NET/NESTC SGML function characters: basically, sgmljs supports the SGML reference concrete syntax only, and adopts WebSGML/Annex K for XML (which contains a somewhat painful adaption of XML's empty element syntax into the SGML framework) in so far as it is required to support XML. For example, SGML's null-end tag feature (other than as necessary for parsing XML) isn't supported. On Mon, Oct 24, 2016 at 11:00 AM, Michael Kay <mike@saxonica.com> wrote: > Is there a profile that works as an XML parser? We could really do with a > good conformant XML parser for the Javascript environment. > > Michael Kay > Saxonica > > On 23 Oct 2016, at 16:24, u123724 <u123724@gmail.com> wrote: > > I have been writing a new SGML parser, called sgmljs, over the last couple > of years, and I'd like to to announce it here on xml-dev on the occasion of > the SGML standard's publication 30th anniversary. > > sgmljs is a fairly complete SGML parser, including even SGML LINK in all > it's glory. The only major things missing are full SHORTREF support > (but it has markdown support built-in, presented as a SHORTREF application), > and limitations with respect to what operands can appear in allgroup content > models. > > sgmljs is implemented in JavaScript (ES5) and is intended as a template > engine for > web applications that can run both in the browser as well as on the > server-side > (under node.js and other JavaScript containers). > > The software is about to be released later this year under a copyleft > license, > if there's any interest at all in it. > > Right now, it can be run in a web browser (please contact me if you're > interested, > as I haven't it setup for public access due to bandwidth concerns this > weekend; > you can get my details on http://sgmljs.net). > > I've also written a silly blog post on 30 years of SGML which is featured on > Hacker News today at https://news.ycombinator.com/item?id=12771321, or > directly > on http://sgmljs.net/blog.html. > > Best, > Marcus Reichardt > sgmlnet.js > >
[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
|