[Thread Prev][Thread Next][Index]
Re: Includes in LAS xml files
Hi Joe,
Thanks, but it didn't work. I hope someone can spot a problem (like maybe a
missing semicolon). Here are the details:
I modified my las.xml file as follows:
<?xml version='1.0' ?>
<!DOCTYPE spec SYSTEM "spec.dtd" [
<!-- Declaration of operations files to be included -->
<!ENTITY StdOperations SYSTEM "operations.xml">
<!ENTITY insitu_operations SYSTEM "insitu_operations.xml">
<!-- Declaration of dataset files to be included -->
<!ENTITY InsituDatasets SYSTEM "Insitu_Datasets.xml">
(note: this next item was already in the las.xml file)
<!-- Declaration of variables files to be included -->
<!ENTITY CEOP_Insitu_Surface_Mongolia_DGS SYSTEM "CEOP_Insitu_Surface_Mongol
ia_DGS.xml">
(note: I added this next item to the xml.file)
<!-- Declaration of variable names files to be included -->
<!ENTITY InsituAirTemperature SYSTEM "Insitu_Air_Temperature.xml">
]>
<lasdata>
<las_categories>
&InsituDatasets;
</las_categories>
(note: other stuff deleted)
(note: this next line was already in las.xml)
<!-- Datasets provided by this server -->
&CEOP_Insitu_Surface_Mongolia_DGS;
</lasdata>
Next, I created a new xml file Insitu_Air_Temperature.xml containing this on
e line:
<Station_Pressure name="Station Pressure" units="hPa (mb)">
Next, I modified the file CEOP_Insitu_Surface_Mongolia_DGS.xml as follows.
First, the original version:
<datasets>
<Insitu_Surface_Mongolia_DGS name="CEOP Surface Mongolia DGS"
url="Insitu/CAMP_Mongolia_20021001_20030331sfc.data"
doc="">
(note: other stuff deleted)
<variables>
<Station_Pressure name="Station Pressure" units="hPa (mb)">
<link match="/lasdata/grids/DGS_XYZT_grid"/>
</Station_Pressure>
I modified this file by replacing one line in the variables section as follo
ws:
<variables>
&InsituAirTemperature;
<link match="/lasdata/grids/DGS_XYZT_grid"/>
</Station_Pressure>
The error message that I got from the make was:
asynchronous entity at line 2, column 0, byte 63:
<Station_Pressure name="Station Pressure" units="hPa (mb)">
^
error in processing external entity reference at line 32, column 3, byte 901:
<variables>
&InsituAirTemperature;
==^
<link match="/lasdata/grids/DGS_XYZT_grid"/>
</Station_Pressure>
error in processing external entity reference at line 53, column 0, byte 1649:
<!-- Datasets provided by this server -->
^
&CEOP_Insitu_Surface_Mongolia_DRS;
at /usr/lib/perl5/site_perl/5.6.0/i386-linux/XML/Parser.pm line 185
make: *** [../ui/config.js] Error 255
What does "asynchronous entity" mean in this case?
After this I tried one more thing. I added &InsituAirTemperature; to la
s.xml as follows:
<!-- Datasets provided by this server -->
&CEOP_Insitu_Surface_Mongolia_DGS;
&InsituAirTemperature;
</lasdata>
But I got exactly the same error message.
Does anyone see anything wrong?
Thanks,
Ben
At 15:13 2004/10/06 -0700, you wrote:
> Hi Ben,
> I have no example for you at the moment, but I have an explanation which
> I think will help.
> XML ENTITIES are declared in the DOCTYPE definition which must be
> declared before the first element in the XML document.
> Therefore all ENTITIES must be declared in your root document which by
> default is las.xml (the first xml element in the las.xml file is <lasdata>)
> Once it is declared there, then you can use the reference anywhere
> within the document
> i.e.
> these two Entities are declared in the las.xml DOCTYPE definition
> -----------------------------
> <?xml version='1.0' ?>
> <!DOCTYPE spec SYSTEM "spec.dtd" [
>
> <!-- Declaration of dataset files to be included -->
> <!ENTITY ceop_surf_mong_dgs SYSTEM "CEOP_Insitu_Surface_Mongolia_DGS.xml">
>
> <!-- Other Entities -->
> <!ENTITY VarNameStationPressure SYSTEM "Var_Name_Station_Pressure.xml">
>
> ]>
> <lasdata>
> [...]
> ------------------------------
> now you can use "&ceop_surf_mong_dgs;" as a reference in the las.xml
> document and you can use "&VarNameStationPressure;" in the las.xml
> document or in CEOP_Insitu_Surface_Mongolia_DGS.xml.
>
> Hope this helps.
>
> Joe
> -------------------------------------
>
> Ben Burford wrote:
>
> >Hello All,
> >
> >I'm a beginner at XML and I'm building LAS menus. I have a category file
th
> >at (partially) looks like:
> >
> >(file is Insitu_Datasets.xml)
> ><category name="Insitu">
> >
> > <category name="Surface">
> >
> > <category name="CAMP_Mongolia">
> > <category name="BTS">
> > <filter action="apply-dataset" equals="CEOP Surface Mongolia BTS"/>
> > </category>
> >
> >(this leads to the file CEOP_Insitu_Surface_Mongolia_DGS.xml which contai
ns)
> ><datasets>
> > <Insitu_Surface_Mongolia_DGS name="CEOP Surface Mongolia DGS"
> > url="Insitu/CAMP_Mongolia_20021001_20030331sfc.data"
> > doc="">
> > <properties>
> > (properties stuff not important)
> > </properties>
> >
> > <variables>
> >
> > <Station_Pressure name="Station Pressure" units="hPa (mb)">
> > <link match="/lasdata/grids/DGS_XYZT_grid"/>
> > </Station_Pressure>
> >
> >(etc. for more variables, then grids then axes).
> >In this line:
> > <Station_Pressure name="Station Pressure" units="hPa (mb)">
> >
> >Station Pressure will appear as a menu entry. This list of variables wi
ll
> >appear in about 100 different menu pages (and therefore in about 100 diff
ere
> >nt xml files, one for each location) for several locations and stations w
ith
> >in locations. I want to make this line an xml file/xml include so that,
if
> >I want to change the text of the menu item, I only change it in the one x
ml
> >file, and not 100 xml files. In other words, I want to create the xml fi
le
> >Var_Name_Station_Pressure.xml which would contain one line:
> >
> > <Station_Pressure name="Station Pressure" units="hPa (mb)">
> >
> >and then in CEOP_Insitu_Surface_Mongolia_DGS.xml put &VarNameStationPress
ure
> >; as in:
> >
> ><variables>
> >
> > &VarNameStationPressure;
> > <link match="/lasdata/grids/DGS_XYZT_grid"/>
> > </Station_Pressure>
> >
> >so the 1 line would be substituted. I created the xml file Var_Name_Stat
ion
> >_Pressure.xml and changed my original xml file by changing the one line
to
> > &VarNameStationPressure; as I show just above. I also tried putting t
he
> >following at the beginning of the CEOP_Insitu_Surface_Mongolia_DGS.xml fi
le:
> >
> ><?xml version='1.0' ?>
> ><!DOCTYPE spec SYSTEM "spec.dtd" [
> >
> ><!ENTITY VarNameStationPressure SYSTEM "Var_Name_Station_Pressure.xml">
> >
> >]>
> >
> >So, is it possible to put this one line ( <Station_Pressure name="Stati
on
> >Pressure" units="hPa (mb)"> ) in a separate xml file and then put it into
CE
> >OP_Insitu_Surface_Mongolia_DGS.xml as an xml include?
> >
> >If anyone has an existing xml file(s) as an example that you can send me
as
> >attached files, that would be the ideal and easy way to explain.
> >
> >Thanks very much,
> >
> >Ben
> >
> >
> >
> >
>
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement