Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Getting PUBLIC-ID

Reply
Thread Tools

Getting PUBLIC-ID

 
 
stephane.mottelet@nospam.gnark.gnark
Guest
Posts: n/a
 
      09-19-2005

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

 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      09-19-2005

k 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/
 
Reply With Quote
 
 
 
 
Philippe Poulard
Guest
Posts: n/a
 
      09-19-2005
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 ?
--
Cordialement,

///
(. .)
-----ooO--(_)--Ooo-----
| Philippe Poulard |
-----------------------
 
Reply With Quote
 
stephane.mottelet@nospam.gnark.gnark
Guest
Posts: n/a
 
      09-19-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
You Mean I Won't Be GEtting Paid More for Getting This Cert? TBone MCSE 13 10-30-2007 01:10 PM
You Mean I Won't Be GEtting Paid More for Getting This Cert? TBone MCDST 7 10-30-2007 01:10 PM
Re: You Mean I Won't Be GEtting Paid More for Getting This Cert? Frisbee® MCSE 0 10-22-2007 03:32 PM
Getting User Input after getting Input from a file dei3cmix@uga.edu C++ 3 03-23-2006 05:01 AM
How to avoid getting BGP routes while getting a router's routing table ncosta@net.ipl.pt Cisco 2 01-25-2006 11:50 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57