Philippe Poulard wrote:
> k wrote:
>
>>
>> Hi.
>>
>> Is there an xsl function to get the PUBLIC-ID in
>> the DOCTYPE declaration (or even in exsl) of an
>> XML file ?
>>
>> S.
>>
>> - e-mail : k
>>
>
> IMHO, using the public ID in XSLT is not relevant ; it is rather a job
> for catalogs (or entity resolvers)
>
> What do you want to do with it in XSLT ?
I have an xsl stylesheets working on some variations (default language is
different) of a DTD. I have three possible public id's e.g.
-//UTC//DTD XMLlab V1.4//EN
-//UTC//DTD XMLlab V1.4//FR
-//UTC//DTD XMLlab V1.4//ES
-//UTC//DTD XMLlab V1.4//DE
in each corresponding DTD only the default value of some xml:lang
attribute is changing (en,fr,es or de). But the stylesheet is the same. The
problem is that I have some kind of "almost identity" transformation to
do and that the public-id should be preserved.
I have finaly used some default attribute on the top-most element to
identify
the default language without knowing the plublic-id. When the document is
created, it requires to form "by hand" the correct public id for each
case by
using an <xsl:choose> structure. If there was a function to get the
public-id
it could have been much simpler.
S.
--
e-mail :
k