Sorry. I let my attendance on this list slip a bit :-( Overwhelmed with work. Honestly, though this is my second home, you're almost always going to have quicker response posting ot the 4Suite list ( http://lists.fourthought.com/mailman/listinfo/4suite )
On Sun, 2005-03-13 at 01:16 -0800, Brock Filer wrote: > I've gone as far as my brain can take XSL, and so started experimenting > with Amara. > It's wonderful, but is there some way I can use it to output an > internal DTD subset? I've been working with Luis Morillas to get this right. In CVS the following does the trick: doc = binderytools.create_document( u"xsa", pubid=u"-//LM Garshol//DTD XML Software Autoupdate 1.0//EN//XML", sysid=u"http://www.404.net/xsa.dtd" ) print doc.xml(indent=u'yes') Which results in: <!DOCTYPE xsa PUBLIC "-//LM Garshol//DTD XML Software Autoupdate 1.0//EN//XML" "http://www.404.net/xsa.dtd"> <xsa/> > I need it to declare certain attributes as IDs and > IDREFs for subsequent xsl processing. I know I could reference an > external DTD, but I prefer to keep that important data in the document, > more robust that way. This is a harder one. I think it's probably feasible, but I probably couldn't say what the best API would be. DO you have any thoughts of how you'd imagine such an API? > So I'm just sticking it in the file as a string. > But that's hackish, and also means that my script needs to know the > internal subset. I'd like to be able to just duplicate the declaration > from the input document to the output doc. But wouldn't you need to know the internal subset, anyway, so you could call the update API to, say add an element declaration? -- Uche Ogbuji Fourthought, Inc. http://uche.ogbuji.net http://4Suite.org http://fourthought.com Use CSS to display XML, part 2 - http://www-128.ibm.com/developerworks/edu/x-dw-x-xmlcss2-i.html Introducing the Amara XML Toolkit - http://www.xml.com/pub/a/2005/01/19/amara.html Gems from the Mines: 2002 to 2003 - http://www.xml.com/pub/a/2005/03/02/pyxml.html Be humble, not imperial (in design) - http://www.adtmag.com/article.asp?id=10286 Querying WordNet as XML - http://www.ibm.com/developerworks/xml/library/x-think29.html Packaging XSLT lookup tables as EXSLT functions - http://www.ibm.com/developerworks/xml/library/x-tiplook2.html _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig