> 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" ?>
  exclude-result-prefixes="msxsl utilitaires"


function doctypeSystemID(domNodeList) {
var result = domNodeList.item(0).doctype.xml,
suffix_index, i, docURL,
  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("/") +
  result = docPath + result;
  return ( result );


<xsl:template match="/">
<h1>Document source DTD :</h1>
<xsl:value-of select="utilitaires:doctypeSystemID(/)" />


> 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,
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.

Reply via email to