473,585 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DTD and catalog problem

Hi group,

I am really desperate but
I think I am missing only a minor part. Basically I want to pipe
a global entity (the one you dereference with the &) through my
dtd into the xml-file I am writing. Basically something like
the € in docbook. If I put the parameter entity into the
[] Brackets in the xml file(test2.xml) it works. But if
I wan't to use it via a catalog in the dtd(test.xml) it does not work.

I would be really thankful for any help.

Here the files:

test.xml:
<?xml version='1.0' encoding="ISO-Latin-1"?>
<!DOCTYPE test SYSTEM "Mydtd">
<test>
&entity;
</test>

test2.xml:
<?xml version='1.0' encoding="ISO-Latin-1"?>
<!DOCTYPE test SYSTEM "Mydtd"
[
<!ENTITY % W SYSTEM "Website_Links" >
%W;
]

<test>
&entity;
</test>

Mydtd.dtd:
<?xml version='1.0' encoding="ISO-Latin-1"?>
<!ELEMENT test (#PCDATA)>
<!ENTITY % W SYSTEM "Website_Links" >
%W;

Catalog:
<?xml version='1.0' encoding="ISO-Latin-1"?>
<catalog xmlns="urn:oasi s:names:tc:enti ty:xmlns:xml:ca talog">
<group prefer="system" xml:base="file:///home/goofy/docbook/" >
<system systemId="Mydtd " uri="dtd/Mydtd.dtd"/>
<system systemId="W" uri="Entities/W.xml/>
</group>
</catalog>

W.xml:
contains tons of entities like:
<!ENTITY entity SYSTEM "TESTSTRING ">
Jul 20 '05 #1
4 1945
"Thomas Sommer" <ma****@gmx.d e> wrote in message
news:pa******** *************** *****@gmx.de...
If I put the parameter entity into the
[] Brackets in the xml file(test2.xml) it works. But if
I wan't to use it via a catalog in the dtd(test.xml) it does not work.


What parsers or applications have you tried this with?

What error message(s) do you get?

/kmc
Jul 20 '05 #2
Sorry, it was pretty late yesterday
besides I messed up the catalog a bit.
<system systemId="W" uri="Entities/W.xml/>
Should be:
<system systemId="Websi te_Links" uri="Entities/W.xml/>

I do the following (xsltproc):

export SGML_CATALOG_FI LES="file:///home/goofy/docbook/catalog.xml"
xmllint --debug --catalogs --valid test.xml

The output:

file:///home/goofy/docbook/dtd/Mydtd.dtd:4: I/O error :
failed to load external entity
"file:///home/goofy/docbook/dtd/Website_Links"
%W;

The thing is:
I totally understand what happens. Resolving "Mydtd" to
/home/goofy/docbook/dtd/Mydtd.dtd works perfect. But afterwards it
does not get
out of the dtd directory anymore. It should resolve Website_Links to
/home/goofy/docbook/Entities/W.xml but does:
/home/goofy/docbook/dtd/Website_Links which does not exist.

If I put the real path in the dtd-file:
<!ENTITY % W SYSTEM "/home/goofy/docbook/Entities/W.xml">
everything works fine but I should be able to use a system identifier
for that. Right? Or does it need to be a public one. If so this could
explain things.
Thanks Thomas
Jul 20 '05 #3
"Thomas Sommer" <ma****@gmx.d e> wrote in message
news:10******** *************** ***@posting.goo gle.com...
The thing is:
I totally understand what happens. Resolving "Mydtd" to
/home/goofy/docbook/dtd/Mydtd.dtd works perfect. But afterwards it
does not get
out of the dtd directory anymore. It should resolve Website_Links to
/home/goofy/docbook/Entities/W.xml but does:
/home/goofy/docbook/dtd/Website_Links which does not exist.


Have you tried turning on xmllint catalog debugging?

export XML_DEBUG_CATAL OG=

Sorry I haven't had a chance to try this.

/kmc
Jul 20 '05 #4
Have you tried turning on xmllint catalog debugging?

export XML_DEBUG_CATAL OG=

Sorry I haven't had a chance to try this.


No but I solved the problem. I finally understood that the SYSTEM
entry is a relativ thing (unless you give it the absolut path).
So going into the directory where my dtd lies will add this path
in front of the SYSTEM-identifier -> this of course is not found in
the catalog. Using PUBLIC is solving the problem.

Thanks anyway
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2176
by: Adisorn Ratanakovit | last post by:
When you set up a full-text catalog in SQL Server and you set up the population schedule, a job gets created and scheduled under SQL Server Agent. The problem I encountered recently is when I disabled that job in SQL Server Agent, the full-text catalog continues to be populated with that schedule (every 15 minutes). So I looked at the...
2
2764
by: Simon Strandgaard | last post by:
I am trying to understand how to create a 'catalog.xml' file for my docbook-xml documents. If I understand correct a local catalog.xml file can both avoid hardcoding in makefiles (portability), plus speed up if the stylesheet+dtds is located on the local machine. Question #1: How do I create a catagory.xml file, which works?
6
2825
by: Vincent Lefevre | last post by:
I would like to know if the base URI considered to resolve an unparsed entity defined by a relative URI should be the URI before or after its rewriting due to a possible catalog. Let's take an example. Here's my XML file: <?xml version="1.0"?> <!DOCTYPE para PUBLIC "-//Norman Walsh//DTD Website Full V2.4.0//EN"...
6
9245
by: Chuck | last post by:
What's the difference between using "catalog node" and catalog admin node"? -- Chuck Remove "_nospam" to reply by email
0
1935
by: xixi | last post by:
i have been tring to add a new catalog system on my local machine control center from remote server, after i create the host and node, i try to catalog the database, then when i try to access it, it gives me the error IBM] SQL30061N The database alias or database name "NJIPD " was not found at the remote node. SQLSTATE=08004 ...
2
5640
by: Stefan Amann | last post by:
Hi all When I try to connect to an remote database I get the following error message: "The SQL statement failed because of a non-severe system error. Subsequent SQL statements can be processed. (Reason "Invalid Request type for DB2 Admin Server".)"
5
5386
by: Sam Durai | last post by:
Do db2 system catalog table require maintenance (reorg/runstat) ? Thanks, Sam
2
2712
by: Laurence | last post by:
Hi folks, I installed DB2 V9.1 FP2 on RHEL AS V4 (DB2 Server) and Win XP SP2 (DB2 Client). The strange thing, there were two database aliases TOOLS0 & TOOLS1 in the DB2 Client that were mapping to the same remote tools catalog database TOOLSDB in the DB2 Server after I created a new tools catalog database by Control Center.
2
8634
by: db2doubts | last post by:
Hi, I am new to DB2, i want to catalog DB2 databases in Control Center(Windows) but databases exist in AIX server I catalog the database by following commands in CLP (windows) =>catalog tcpip node <node name> remote <server name> server <port no> =>catalog database <db name> at node <node name>
0
7836
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8212
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3835
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1175
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.