473,378 Members | 1,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 1069

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Robert | last post by:
Hello all... In my code below, the Notify Constructor and Destructor is getting called twice and it appears that a new Notify object is created on the 2nd call. The 2nd call is caused by this...
1
by: diogoko | last post by:
Has anyone been sucessful in getting/reading a RSA or DSA public key using the openssl functions? openssl_get_publickey should work with PEM files, but it doesn't... I've tried creating a...
3
by: Twanger | last post by:
I'm getting a compiler error on my ASP.NET page and I can't see the cause. I have a simple C# class compiled into a DLL and placed in my bin directory which has a public property QuestionText. ...
0
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) :...
0
by: OldMacDonald | last post by:
I have a Web Service which I call ASynchronously. The problem its not getting kicked off. This is how I am calling it over HTTP and after calling the webservice I have a redirect to another page. I...
0
by: buntyindia | last post by:
Hi, I have a very strange problem with my application. I have developed it using Struts. I have a TextBox With Some fixed value in it and on Submit iam passing it to another page. <html:form...
12
by: miguelguerin | last post by:
Im having trouble getting the input from one file to another. Main file: package assigment3; /** * * @author mguer017 */ public class Main {
11
by: Sachin Garg | last post by:
I need to build two executables from my code, one having all the code (and thus application features) and other not having it all. How to best manage the code that shouldn't go in one of the...
8
by: Pallav singh | last post by:
#include<iostream.h> #include<memory.h> #include<string.h> // product class Pizza { private : std::string Topping;
5
by: tshad | last post by:
I have the following class in my VS 2008 project that has a namespace of MyFunctions. ********************************* Imports System Imports System.Text.RegularExpressions Namespace...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.