SD5 - alternates using PIs, using mulitple DOCTYPE

Here is an alternate version of the SD5 example, using PIs rather than "<*"

<XML>
  <!-- processing header -->
  <?xml-schema ref="http://www.bigbookstore.com/schema" gi-prefix="bk" ?>
  <?xml-schema ref="http://www.w3.org" gi-prefix="org.w3.www" ?>
  <?xml-schema ref="http://purl.org/dublincore" gi-prefix="dc" ?>
  <?xml-schema ref="http://www.shipping.com" gi-prefix="sh" ?>
  <?xml-nature class="attribute" gi-root="org.w3.www.DSIG" ?>

  <!-- data body -->
  <bk.ORDERS>
    <LINEITEM XML-ID="LI1">
      <dc.NAME>Number, the Language of Science</dc.NAME>
      <dc.AUTHOR>Dantzig</dc.AUTHOR>
      <PRICE>5.95</PRICE>
      <sh.ZONE>9</sh.ZONE>
      <org.w3.www.DSIG>
        <DIGEST>1234567890</DIGEST>
        <SIGNER>AndrewL@microsoft.com</SIGNER>
      </org.w3.www.DSIG>
    </LINEITEM >
  </bk.ORDERS>
</XML>

To me this is cleaner, less confusing, and compatible with SGML.

If the schema is merely a substitute DTD entity cross-reference,
it seems a reinvention of the wheel, since SGML already has a construct
for that (DOCTYPE) which, if it is not enough, should be improved rather
than discarded.    
 
<!DOCTYPE #IMPLIED SYSTEM
[
  <!-- namespaces and schemas -->
  <!DOCTYPE #PREFIX bk
	SYSTEM "http://www.bigbookstore.com/schema" >
  <!DOCTYPE #PREFIX org.w3.www
	SYSTEM "http://www.w3.org" >
  <!DOCTYPE #PREFIX dc  
	SYSTEM "http://purl.org/dublincore" >
  <!DOCTYPE #PREFIX sh
	SYSTEM "http://www.shipping.com">

  <!-- define special natures for elements -->
  <?xml-nature class="attribute" gi-root="org.w3.www.DSIG" ?>

]>
<XML>
  <bk.ORDERS>
    <LINEITEM XML-ID="LI1">
      <dc.NAME>Number, the Language of Science</dc.NAME>
      <dc.AUTHOR>Dantzig</dc.AUTHOR>
      <PRICE>5.95</PRICE>
      <sh.ZONE>9</sh.ZONE>
      <org.w3.www.DSIG>
        <DIGEST>1234567890</DIGEST>
        <SIGNER>AndrewL@microsoft.com</SIGNER>
      </org.w3.www.DSIG>
    </LINEITEM >
  </bk.ORDERS>
</XML>

Rick Jelliffe

Received on Friday, 16 May 1997 05:54:51 UTC