\hypertarget{mixed}{}\subsection{Mixed Content}\label{mixed}
Mixed content, that is text interleaved with markup, also requires ordering. The following example includes combined text and markup. Note that the text content of an element appears as an rdf:value.



\begin{DocInclude}\begin{verbatim}<?xml version="1.0"?>
<letterBody>
<salutation>Dear Mr.<name>Robert Smith</name>.</salutation>
Your order of <quantity>1</quantity> <productName>Baby
Monitor</productName> shipped from our warehouse on
<shipDate>1999-05-21</shipDate>. ....
</letterBody>


\end{verbatim}
\end{DocInclude}
 

\begin{DocInclude}\begin{verbatim}<schema xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:element name="letterBody">
  <xsd:complexType mixed="true">
    <xsd:sequence>
      <xsd:element name="salutation">
        <xsd:complexType mixed="true">
          <xsd:sequence>
            <xsd:element name="name" type="xsd:string"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="quantity"    type="xsd:positiveInteger"/>
      <xsd:element name="productName" type="xsd:string"/>
      <xsd:element name="shipDate"    type="xsd:date" minOccurs="0"/>
      <!-- etc. -->
    </xsd:sequence>
  </xsd:complexType>
</xsd:element>

</schema>
\end{verbatim}
\end{DocInclude}
 

\begin{DocInclude}\begin{verbatim}# Base: http://example.org/mix.xml
@prefix xsd_:    <http://www.w3.org/2001/XMLSchema#> .
@prefix ns1:     <http://example.org/def/> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix :        <#> .

<>    ns1:letterBody _:b1 .

_:b2  a       rdf:Seq ;
      rdf:_1  [ a       rdf:Statement ;
                rdf:object "Dear Mr." ;
                rdf:predicate rdf:value ;
                rdf:subject _:b2
              ] ;
      rdf:_2  [ a       rdf:Statement ;
                rdf:object "Robert Smith"^^xsd_:string ;
                rdf:predicate ns1:name ;
                rdf:subject _:b2
              ] ;
      rdf:_3  [ a       rdf:Statement ;
                rdf:object "." ;
                rdf:predicate rdf:value ;
                rdf:subject _:b2
              ] ;
      rdf:value "Dear Mr." , "." ;
      ns1:name "Robert Smith"^^xsd_:string .

_:b1  a       rdf:Seq ;
      rdf:_1  [ a       rdf:Statement ;
                rdf:object _:b2 ;
                rdf:predicate ns1:salutation ;
                rdf:subject _:b1
              ] ;
      rdf:_2  [ a       rdf:Statement ;
                rdf:object "Your order of" ;
                rdf:predicate rdf:value ;
                rdf:subject _:b1
              ] ;
      rdf:_3  [ a       rdf:Statement ;
                rdf:object "1"^^xsd_:positiveInteger ;
                rdf:predicate ns1:quantity ;
                rdf:subject _:b1
              ] ;
      rdf:_4  [ a       rdf:Statement ;
                rdf:object "Baby Monitor"^^xsd_:string ;
                rdf:predicate ns1:productName ;
                rdf:subject _:b1
              ] ;
      rdf:_5  [ a       rdf:Statement ;
                rdf:object "shipped from our warehouse on" ;
                rdf:predicate rdf:value ;
                rdf:subject _:b1
              ] ;
      rdf:_6  [ a       rdf:Statement ;
                rdf:object "1999-05-21"^^xsd_:date ;
                rdf:predicate ns1:shipDate ;
                rdf:subject _:b1
              ] ;
      rdf:_7  [ a       rdf:Statement ;
                rdf:object ". ...." ;
                rdf:predicate rdf:value ;
                rdf:subject _:b1
              ] ;
      rdf:value "Your order of" , ". ...." , "shipped from our warehouse on" ;
      ns1:productName "Baby Monitor"^^xsd_:string ;
      ns1:quantity "1"^^xsd_:positiveInteger ;
      ns1:salutation _:b2 ;
      ns1:shipDate "1999-05-21"^^xsd_:date .
\end{verbatim}
\end{DocInclude}
 