> First question: what is the DTD name: the system > identifier (usually a file name or URL), the optional > public identifer, or the name of the document element?
The DTD name is the name of the DTD file, for example: 'foo.dtd'. is it the system identifier ? > There is no standardized mechanism to get either the > system or the public identifier from within XSLT. > You'll have to pass it as a parameter, or use an > extension function. There isn't a standard Java API > method to retrieve them either. I used the following solution but it isn't run with fop: ************** foo.xsl ********************* <?xml version="1.0" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:utilitaires="urn:x-msxsl-script:mes-utilitaires" exclude-result-prefixes="msxsl utilitaires" version="1.0"> <msxsl:script language="JScript" implements-prefix="utilitaires"><![CDATA[ function doctypeSystemID(domNodeList) { var result = domNodeList.item(0).doctype.xml, suffix_index, i, docURL, docPath; suffix_index = result.indexOf(".dtd\""); i = result.substring(0, suffix_index).lastIndexOf("\""); result = result.substring(i + 1, suffix_index + 4); docURL = domNodeList.item(0).url; docPath = docURL.substring(0, docURL.lastIndexOf("/") + 1); result = docPath + result; return ( result ); } ]]></msxsl:script> <xsl:template match="/"> <html><body> <h1>Document source DTD :</h1> <xsl:value-of select="utilitaires:doctypeSystemID(/)" /> </body></html> </xsl:template> </xsl:stylesheet> ******************************************** > Why do you think you need it? There are not much > use cases, and none in connection with generating > FO that I am aware of. I need it because I build a technical document within I must display it. Thank you, Marie -------------- Profitez des 2 offres exceptionnelles Tiscali ! "Internet Gratuit le Jour" et "Modem ADSL rembours�" Cliquez ici, http://register.tiscali.fr/forfaits_ls/ Offres soumises � conditions.
