W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

Re: Embedding HTML

From: Steve Rosenberry <Steve.Rosenberry@ElectronicSolutionsCo.com>
Date: Fri, 14 Mar 2003 03:57:31 -0500
Message-ID: <3E71997B.32A84860@ElectronicSolutionsCo.com>
To: xmlschema-dev@w3.org



Sam Carleton wrote:
> 
> I have a simply Q.  I have an XML document destine to be transformed
> into a XHTML page.  Within this XML document there is one element
> named <definition> which contains XHTML that will simply be copied
> from the XML to the XHTML page.  How do I go about defining the
> definition element so that it can contain XHTML but not any old
> element?


I believe the following provides a good start for what you're looking
for:

   http://www.w3.org/TR/xhtml-m12n-schema/
   http://www.w3.org/TR/xhtml-m12n-schema/schema-modules.html


I took the easy way out with the following, but it simply allows a mix
of text nodes and, unfortunately, "any old element":

  <xs:complexType name="HTMLText" mixed="true">
    <xs:complexContent mixed="true">
      <xs:restriction base="xs:anyType">
        <xs:sequence>
          <xs:any processContents="skip" 
                  minOccurs="0" 
                  maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>



-- 
Steve Rosenberry
Sr. Partner

Electronic Solutions Company -- For the Home of Integration
http://ElectronicSolutionsCo.com

(610) 670-1710
Received on Friday, 14 March 2003 04:01:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT