W3C home > Mailing lists > Public > spec-prod@w3.org > January to March 2003

Re: Python Tool for excerpting schema/examples into XHTML spec

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 24 Jan 2003 10:55:11 +0000
To: Joseph Reagle <reagle@w3.org>
Cc: spec-prod@w3.org, "Phillip Hallam-Baker" <pbaker@verisign.com>
Message-ID: <f5br8b24y28.fsf@erasmus.inf.ed.ac.uk>

For what it's worth, I've taken a sort of inverse approach in XML
Schema -- I've added support for a 'text' attribute on the <eg>
element to the stylesheets, so that e.g.

  <eg xml:space="preserve" text="&docHome;/XMLSchema.dtd,txt"/>

does the right thing, and written a very simple script which "quotes"
XML so that it can be included in this way.  Then my Makefile has
something such as

spec.html: spec.xml xmpl1.xml,txt

%,txt: %
	xml2xmpl $< > $@

where xml2xmpl looks like this:

        #!/bin/sh
        echo -n "<txt><![CDATA["
        rxp $@
        echo "]]></txt>"

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Friday, 24 January 2003 05:55:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:19:12 GMT