[Thread Prev][Thread Next][Index]

Includes in LAS xml files



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 contains)
<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 will 
appear in about 100 different menu pages (and therefore in about 100 differe
nt xml files, one for each location) for several locations and stations with
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 xml 
file, and not 100 xml files.  In other words, I want to create the xml file 
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 &VarNameStationPressure
; 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_Station
_Pressure.xml  and changed my original xml file by changing the one line to 
   &VarNameStationPressure; as I show just above.  I also tried putting the 
following at the beginning of the CEOP_Insitu_Surface_Mongolia_DGS.xml file:

<?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="Station 
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