spacer
Yehuda Shiran February 15, 2002
Defining the Grammar of Leaf Cells
Tips: February 2002

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source
When specifying the structure of an XML file in the DTD, you will reach the leaf cells in your XML tree structure. Leaf-cell elements do not include element but are pure Parsed Character Data (PCDATA). You define their content as (#PCDATA). Here are the leaf cells in our mydvd XML file:

<!ELEMENT heading (#PCDATA)>
<!ELEMENT subhead (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT week (#PCDATA)>
Here is the mydvd XML file:

  <?xml version="1.0"?>
  <?xml-stylesheet type="text/xsl" href="mydvd7.xsl"?>
  <!DOCTYPE sales SYSTEM "mydvd8.dtd">
    <sales>
      <summary>
        <heading>MyDVD Rental Store</heading>
        <subhead>Periodical Sales Report</subhead>
        <description>Sales Report for January, February, and &lt;&month;&gt; of 2001</description>
        <author>author: &preparedby;</author>
  	    <date>Jan 30, 2002</date>
      </summary>
      <data>
        <month>
          <name>January 2001</name>
          <week number="1" dvds_rented="12000" />
          <week number="2" dvds_rented="15000" />
          <week number="3" dvds_rented="18000" />
          <week number="4" dvds_rented="11800" />		  
        </month>
        <month>
          <name>February 2001</name>
          <week number="2" dvds_rented="12390" />
          <week number="3" dvds_rented="19050" />
          <week number="4" dvds_rented="11200" />		  
        </month>
        <month>
          <name>March 2001</name>
          <week number="1" dvds_rented="15300" />
          <week number="2" dvds_rented="12390" />
          <week number="3" dvds_rented="10050" />
          <week number="4" dvds_rented="11230" />		  
        </month>
      </data>
    </sales>

People who read this tip also read these tips:

Look for similar tips by subject:

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Administering RBAC in PHP 5 CMS Framework · xref: Automatic Cross Referencing Script · Book Review: Content Rich
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
MS Access and MySQL · Cisco AutoQoS: VoIP QoS for Mere Mortals · While VoIP Adoption Explodes in Enterprise, Carrier Spending Lags