Getting PUBLIC-ID

S

stephane.mottelet

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 : (e-mail address removed)
 
M

Martin Honnen

Is there an xsl function to get the PUBLIC-ID in
the DOCTYPE declaration (or even in exsl) of an
XML file ?

At least for XSLT/XPath 1.0 the DOCTYPE declaration is not part of the
data model and so there are no functions to provide access to it.

I am not sure whether there are any processors providing extensions to
access it.
 
P

Philippe Poulard

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 : (e-mail address removed)

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 ?
--
Cordialement,

///
(. .)
-----ooO--(_)--Ooo-----
| Philippe Poulard |
-----------------------
 
S

stephane.mottelet

Philippe said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top