469,945 Members | 2,117 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,945 developers. It's quick & easy.

Getting PUBLIC-ID


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 : St***************@nospam.gnark.gnark

Sep 19 '05 #1
3 962

st***************@nospam.gnark.gnark wrote:
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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 19 '05 #2
st***************@nospam.gnark.gnark 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 : St***************@nospam.gnark.gnark


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 |
-----------------------
Sep 19 '05 #3
Philippe Poulard wrote:
st***************@nospam.gnark.gnark 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 : St***************@nospam.gnark.gnark


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 : St***************@nospam.gnark.gnark

Sep 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by diogoko | last post: by
3 posts views Thread by Twanger | last post: by
reply views Thread by OldMacDonald | last post: by
reply views Thread by buntyindia | last post: by
8 posts views Thread by Pallav singh | last post: by
5 posts views Thread by tshad | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.