xml-tools contains a syntax definition in SDF for XML. This syntax defintion is not competely compatible with XML, but it tries to do the job as good as possible in a pure syntax definition.

The syntax definition should not be used for parsing XML files. This might sound odd, but for standard XML parsers do a much better job in terms of performance and standard compliance. The parse-xml-info tool supports parsing XML files with the standard XML parser of Java. So what is the use of the syntax definition? It can be used to embed XML in programming languages like Stratego and Java.

Besides the obvious constructs, the grammar supports entities, character references and namespaces.

Known problems:

  • Stratego.ATerm, SGLR, and SDF just support ASCII and therefore the grammar just supports ASCII. This will not change until SGLR and SDF supports Unicode.

  • DTD declarations in XML files are not supported. The DTD grammar is work in progress. Maybe DTD constructs in XML documents will be supported when this grammar is stable. External document type declarations (DOCTYPE) are supported.

-- MartinBravenboer - 30 Oct 2003

Revision: r1.4 - 27 Jun 2004 - 19:49 - MartinBravenboer
Tools > StrategoXML > XmlTools > XmlSyntaxDefinition
Copyright © 1999-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback