Re: XML keyword definitions

Chris Maden (crism@oreilly.com)
Thu, 9 Jul 1998 12:09:15 -0400 (EDT)


[Dave Jones]
> For this to work though, they need to understand the definition of
> the keywords in xml. Am I right in assuming the document type
> declarations and markup declarations which begin with an <! are all
> self-contained internal keywords which have no other dependencies.

Unless you care about getting external entities to work. If you do,
you'll need to check for entity declarations.

I've written a simple Perl script that loops through a file and
handles external entities. A better thing to do would be to use Larry
Wall's XML::Parser package, which is a wrapper on James Clark's
xmltok, but I'm having shared library problems...

I'm willing to share the Perl script with anyone who wants it; you can
see its current frivolous application as a Diplomacy board game report
generator at <URL:http://crism.ne.mediaone.net/cgi-bin/diplo.pl>.

-Chris

-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>