You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/08/21 00:39:51 UTC

[DO NOT REPLY: Bug 3191] New: Setting namespaces in the DTD through FIXED attributes not working

PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT
ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW
AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE
DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL
BE LOST SOMEWHERE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3191

*** shadow/3191	Mon Aug 20 15:39:51 2001
--- shadow/3191.tmp.25278	Mon Aug 20 15:39:51 2001
***************
*** 0 ****
--- 1,75 ----
+ +============================================================================+
+ | Setting namespaces in the DTD through FIXED attributes not working         |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 3191                        Product: Xerces2-J               |
+ |       Status: NEW                         Version: 2.0.0 [beta]            |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Normal                   OS/Version: Windows NT/2K           |
+ |     Priority: Other                     Component: SAX                     |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xerces-j-dev@xml.apache.org                                  |
+ |  Reported By: caron@unidata.ucar.edu                                       |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ I am setting namespaces in the DTD through FIXED atributes. This no longer 
+ works as it did in xerces 1.3(?)
+ 
+ <!DOCTYPE aggServerConfig 
+ SYSTEM "http://www.unidata.ucar.edu/projects/THREDDS/xml/test.dtd">
+ <aggServerConfig name="Example" version="0.4" 
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+     <server type="DODS" ID="CDC" xlink:href="http://www.cdc.noaa.gov/cgi-
+ bin/nph-nc/Datasets/ncep.reanalysis.dailyavgs/pressure/"/>
+ </aggServerConfig>
+ 
+ with this DTD:
+ <!ELEMENT aggServerConfig (server+)>
+ <!ATTLIST aggServerConfig
+     name CDATA #REQUIRED
+     version CDATA #REQUIRED
+     serverID IDREF #IMPLIED
+     xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"
+ >
+ <!ELEMENT server EMPTY>
+ <!ATTLIST server
+     type (DODS | ADDE | netCDF) #REQUIRED
+     ID ID #REQUIRED
+     xlink:href CDATA #REQUIRED
+ >
+ 
+ is ok, eg running it through the sample Writer give this output:
+ 
+ startPrefixMapping = xlink http://www.w3.org/1999/xlink
+ 
+ <aggServerConfig name="Example" version="0.4">
+     <server ID="CDC" type="DODS" xlink:href="http://www.cdc.noaa.gov/cgi-
+ bin/nph-nc/Datasets/ncep.reanalysis.dailyavgs/pressure/"></server>
+ </aggServerConfig>
+ endPrefixMapping = xlink
+ 
+ but if I leave off the namespace declaration in the xml, relying on the DTD, 
+ then
+ 
+ <!DOCTYPE aggServerConfig 
+ SYSTEM "http://www.unidata.ucar.edu/projects/THREDDS/xml/test.dtd">
+ <aggServerConfig name="Example" version="0.4">
+     <server type="DODS" ID="CDC" xlink:href="http://www.cdc.noaa.gov/cgi-
+ bin/nph-nc/Datasets/ncep.reanalysis.dailyavgs/pressure/"/>
+ </aggServerConfig>
+ 
+ 
+ gives this output:
+ startPrefixMapping = xmlns:xlink http://www.w3.org/1999/xlink
+ 
+ <aggServerConfig name="Example" version="0.4" 
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+     [Fatal Error] test.xml:3:132: The prefix "xlink" for attribute "xlink:href" 
+ is not bound.
+ 
+ error: Parse error occurred - The prefix "xlink" for attribute "xlink:href" is 
+ not bound.
+ 
+ Note that the prefix in the startPrefixMapping callback is different

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org