RE: EMBED and validation
At 10:09 29/11/97 -0500, Eve L. Maler wrote: [...] > >I don't think I've seen it explicitly suggested here, so here goes. If you >want to ensure that what's pointed to is real XML, and "belongs" in that >location, how about using a plain old external text entity? With a >validating XML processor, you can guarantee that (a) the entity will be >expanded in place before it even gets to the application and that (b) it >will be validated in context. Thanks Eve - this is undoubtedly the simplest way of 'including' things and a key feature of XML. This needs promoting as much as possible, and application writers and authors should try to build entity management into their systems. (I am waiting for more experience to see exactly what people want, but I expect to add this to the JUMBO editor). The only area of fuzziness is what the default and optional behaviours of a parser (sic) are. If I write: <!DOCTYPE HTML SYSTEM "html20.dtd" [ <!ENTITY pythagoras SYSTEM "pythagoras.xml"> <!-- in MathML --> ]> <HTML> <HEAD>...</HEAD> <BODY> <P>This is Pythagoras' theorem:<BR> &pythagoras; </P> </BODY> </HTML> and I run it through a parser what will happen? The answer is parser-dependent. It might: - always include and validate external entities in which case there will be a validation error (MathML uses a different DTD from HTML). If the entity is valid, then it creates a 'single document' which is easy to search, etc. One disadvantage is that (for Java) the document could get too big for the JVM. - offer a commandline switch that allows inclusion of external entities OR defers their expansion to the application/processor. In that case the *application* has to be able to able to run a parser over the 'included' MathML. (JUMBO can do this at present - it can even use a different parser from the initial one, which may be useful if they have different behaviours). P. Note, of course, that an application may also want to run a validating parser over the targets of HREF and JUMBO can do this as well. Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic net connection VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary http://www.venus.co.uk/vhg xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
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