RE: XML within XML - includes, transcludes, whatever

> validating the content of <header> is important, and validating the
*content* of <body>
> is important. We can validate those two, seperately using the idea that
> validation is basically a boolean function
>
>    validate(node, content-model)
>
> where "content-model" would be a different DTD for <header> and
> the content of <body>. In other words, read in the XML as a well-formed
> document, then apply validation to the bits you care about. The only
> thing you'd have to be a little careful of was namespaces.

So, if I wanted to embed stuff I might have some XML like:

(ignoring namespaces, spelling, etc.)

<envelope>
 <headers>
  <content-type>multipart</content-type>
 </headers>
 <body>

  <!-- content[0] -->
  <content>
   <headers>
    <content-type>text/xml</content-type>
   </headers>
   <body>
    <any><xml/></any>
   </body>
  </content>

  <!-- content[1] -->
  <content>
   <headers>
    <content-length>xyz</content-length>
    <content-type>image/jpeg</content-type>
    <content-encoding>base64</content-encoding>
   </headers>
   <body>SGVsbG9Xb3JsZA==</body>
  </content>

 </body>
</envelope>

Mike

Received on Friday, 3 November 2000 12:08:40 UTC