OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Word XML

[ Lists Home | Date Index | Thread Index ]

[Please trim all replies to this overlong message. Also, please remember
these are the product of beta code and very definitely subject to
change, though happily it's a public beta.]

The raw XML of this document doesn't give much of a feel for the user
interface of Word 2003 or for its custom XML capabilities, but it does
give a clear picture of the information Word 2003 provides, complete
with a small bit of custom vocabulary usage.

I'll start with my trivial schema (thanks, Trang):
------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified"
targetNamespace="http://simonstl.com/test/";
xmlns:test="http://simonstl.com/test/";>
  <xs:element name="document">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded"
ref="test:hilite"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="hilite">
    <xs:complexType mixed="true"/>
  </xs:element>
</xs:schema>
------------------------------------------------------------------

It's a _document_ element which hosts mixed content including an element
named _hilite_, which again contains mixed content.  I attached this
schema to a somewhat perversely complex Word document, then selected the
whole document and made it the contents of the _document_ element.  I
then marked up some random bits of text with the _hilite_ element.

If I save only the XML data, I get results like:
------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document xmlns="http://simonstl.com/test/";>HeadlineThis is a paragraph
of "Normal" body text. This is a paragraph of "Normal" body text. This
is a paragraph of "Normal" body text. This is a paragraph of "Normal"
body text. This is a new bit of "Normal" body text. <hilite>This is a
paragraph of "Normal" body text.</hilite> This is a paragraph of
"Normal" body text. This is a paragraph of "Normal" body text. This is a
paragraph of "Normal" body text. This is a paragraph of "Normal" body
text. This is a paragraph of "Normal" body text. This is a paragraph of
"Normal" body text. This is a paragraph of "Normal" body text.This is a
Normal <hilite>paragraph</hilite> with extra spacing added around it. A
graphic follows: Column Header OneColumn Header TwoColumn Header
ThreeB1<hilite>B2</hilite>B3C1C2C3</document> 
------------------------------------------------------------------

In practice, I definitely want to do something better than that, but
hopefully you get the idea.  (Book examples of this will be better, I
promise.)

If I save the document with all the WordML, I get a much more verbose
version, which follows.  Note in particular the ns0:document and
ns0:hilite elements.

------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<w:wordDocument
xmlns:w="http://schemas.microsoft.com/office/word/2003/2/wordml";
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:SL="http://schemas.microsoft.com/schemaLibrary/2003/2/core";
xmlns:aml="http://schemas.microsoft.com/aml/2001/core";
xmlns:wx="http://schemas.microsoft.com/office/word/2003/2/auxHint";
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ns0="http://simonstl.com/test/";
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
xml:space="preserve"><o:SmartTagType
o:namespaceuri="urn:schemas-microsoft-com:office:smarttags"
o:name="place"/><o:DocumentProperties><o:Title>Headline</o:Title><o:
Author>Simon St.Laurent</o:Author><o:LastAuthor>Simon
St.Laurent</o:LastAuthor><o:Revision>2</o:Revision><o:TotalTime>1</o:
TotalTime><o:Created>2003-03-19T22:41:00Z</o:Created><o:LastSaved>2003-
03-19T22:41:00Z</o:LastSaved><o:Pages>1</o:Pages><o:Words>124</o:Words><
o:Characters>710</o:Characters><o:Company>O'Reilly &amp;
Associates</o:Company><o:Lines>5</o:Lines><o:Paragraphs>1</o:Paragraphs>
<o:CharactersWithSpaces>833</o:CharactersWithSpaces><o:Version>11.4920</
o:Version></o:DocumentProperties><w:fonts><w:defaultFonts w:ascii="Times
New Roman" w:fareast="Times New Roman" w:h-ansi="Times New Roman"
w:cs="Times New Roman"/><w:font w:name="Tahoma"><w:panose-1
w:val="020B0604030504040204"/><w:charset w:val="00"/><w:family
w:val="Swiss"/><w:pitch w:val="variable"/><w:sig w:usb-0="61007A87"
w:usb-1="80000000" w:usb-2="00000008" w:usb-3="00000000"
w:csb-0="000101FF"
w:csb-1="00000000"/></w:font></w:fonts><w:styles><w:
versionOfBuiltInStylenames w:val="3"/><w:latentStyles
w:defLockedState="off" w:latentStyleCount="156"/><w:style
w:type="paragraph" w:default="on" w:styleId="Normal"><w:name
w:val="Normal"/><w:rPr><wx:font wx:val="Times New Roman"/><w:sz
w:val="24"/><w:sz-cs w:val="24"/><w:lang w:val="EN-US" w:fareast="EN-US"
w:bidi="AR-SA"/></w:rPr></w:style><w:style w:type="paragraph"
w:styleId="Heading1"><w:name w:val="heading 1"/><wx:uiName
wx:val="Heading 1"/><w:basedOn w:val="Normal"/><w:next
w:val="Normal"/><w:rsid w:val="442532"/><w:pPr><w:pStyle
w:val="Heading1"/><w:keepNext/><w:spacing w:before="240"
w:after="60"/><w:outlineLvl w:val="0"/></w:pPr><w:rPr><w:rFonts
w:ascii="Arial" w:h-ansi="Arial" w:cs="Arial"/><wx:font
wx:val="Arial"/><w:b/><w:b-cs/><w:kern w:val="32"/><w:sz
w:val="32"/><w:sz-cs w:val="32"/></w:rPr></w:style><w:style
w:type="character" w:default="on"
w:styleId="DefaultParagraphFont"><w:name w:val="Default Paragraph
Font"/><w:semiHidden/></w:style><w:style w:type="table" w:default="on"
w:styleId="TableNormal"><w:name w:val="Normal Table"/><wx:uiName
wx:val="Table Normal"/><w:semiHidden/><w:rPr><wx:font wx:val="Times New
Roman"/></w:rPr><w:tblPr><w:tblInd w:w="0"
w:type="dxa"/><w:tblCellMar><w:top w:w="0" w:type="dxa"/><w:left
w:w="108" w:type="dxa"/><w:bottom w:w="0" w:type="dxa"/><w:right
w:w="108" w:type="dxa"/></w:tblCellMar></w:tblPr></w:style><w:style
w:type="list" w:default="on" w:styleId="NoList"><w:name w:val="No
List"/><w:semiHidden/></w:style><w:style w:type="table"
w:styleId="TableGrid"><w:name w:val="Table Grid"/><w:basedOn
w:val="TableNormal"/><w:rsid w:val="1941C2"/><w:rPr><wx:font
wx:val="Times New Roman"/></w:rPr><w:tblPr><w:tblInd w:w="0"
w:type="dxa"/><w:tblBorders><w:top w:val="single" w:sz="4"
wx:bdrwidth="10" w:space="0" w:color="auto"/><w:left w:val="single"
w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/><w:bottom
w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0"
w:color="auto"/><w:right w:val="single" w:sz="4" wx:bdrwidth="10"
w:space="0" w:color="auto"/><w:insideH w:val="single" w:sz="4"
wx:bdrwidth="10" w:space="0" w:color="auto"/><w:insideV w:val="single"
w:sz="4" wx:bdrwidth="10" w:space="0"
w:color="auto"/></w:tblBorders><w:tblCellMar><w:top w:w="0"
w:type="dxa"/><w:left w:w="108" w:type="dxa"/><w:bottom w:w="0"
w:type="dxa"/><w:right w:w="108"
w:type="dxa"/></w:tblCellMar></w:tblPr></w:style><w:style
w:type="paragraph" w:styleId="BalloonText"><w:name w:val="Balloon
Text"/><w:basedOn w:val="Normal"/><w:semiHidden/><w:rsid
w:val="432C2D"/><w:pPr><w:pStyle
w:val="BalloonText"/></w:pPr><w:rPr><w:rFonts w:ascii="Tahoma"
w:h-ansi="Tahoma" w:cs="Tahoma"/><wx:font wx:val="Tahoma"/><w:sz
w:val="16"/><w:sz-cs w:val="16"/></w:rPr></w:style><w:style
w:type="character" w:styleId="CommentReference"><w:name
w:val="annotation reference"/><wx:uiName wx:val="Comment
Reference"/><w:basedOn
w:val="DefaultParagraphFont"/><w:semiHidden/><w:rsid
w:val="432C2D"/><w:rPr><w:sz w:val="16"/><w:sz-cs
w:val="16"/></w:rPr></w:style><w:style w:type="paragraph"
w:styleId="CommentText"><w:name w:val="annotation text"/><wx:uiName
wx:val="Comment Text"/><w:basedOn w:val="Normal"/><w:semiHidden/><w:rsid
w:val="432C2D"/><w:pPr><w:pStyle
w:val="CommentText"/></w:pPr><w:rPr><wx:font wx:val="Times New
Roman"/><w:sz w:val="20"/><w:sz-cs
w:val="20"/></w:rPr></w:style><w:style w:type="paragraph"
w:styleId="CommentSubject"><w:name w:val="annotation
subject"/><wx:uiName wx:val="Comment Subject"/><w:basedOn
w:val="CommentText"/><w:next w:val="CommentText"/><w:semiHidden/><w:rsid
w:val="432C2D"/><w:pPr><w:pStyle
w:val="CommentSubject"/></w:pPr><w:rPr><wx:font wx:val="Times New
Roman"/><w:b/><w:b-cs/></w:rPr></w:style><w:style w:type="paragraph"
w:styleId="FootnoteText"><w:name w:val="footnote text"/><wx:uiName
wx:val="Footnote Text"/><w:basedOn
w:val="Normal"/><w:semiHidden/><w:rsid w:val="BA487B"/><w:pPr><w:pStyle
w:val="FootnoteText"/></w:pPr><w:rPr><wx:font wx:val="Times New
Roman"/><w:sz w:val="20"/><w:sz-cs
w:val="20"/></w:rPr></w:style><w:style w:type="character"
w:styleId="FootnoteReference"><w:name w:val="footnote
reference"/><wx:uiName wx:val="Footnote Reference"/><w:basedOn
w:val="DefaultParagraphFont"/><w:semiHidden/><w:rsid
w:val="BA487B"/><w:rPr><w:vertAlign
w:val="superscript"/></w:rPr></w:style></w:styles><w:shapeDefaults><o:
shapedefaults v:ext="edit" spidmax="2050"/><o:shapelayout
v:ext="edit"><o:idmap v:ext="edit"
data="1"/></o:shapelayout></w:shapeDefaults><w:docPr><w:view
w:val="print"/><w:zoom
w:percent="100"/><w:doNotEmbedSystemFonts/><w:attachedTemplate
w:val=""/><w:defaultTabStop
w:val="720"/><w:punctuationKerning/><w:characterSpacingControl
w:val="DontCompress"/><w:optimizeForBrowser/><w:validateAgainstSchema/><
w:saveInvalidXML w:val="off"/><w:ignoreMixedContent
w:val="off"/><w:alwaysShowPlaceholderText
w:val="off"/><w:footnotePr><w:footnote
w:type="separator"><w:p><w:r><w:separator/></w:r></w:p></w:footnote><w:
footnote
w:type="continuation-separator"><w:p><w:r><w:continuationSeparator/></w:
r></w:p></w:footnote></w:footnotePr><w:endnotePr><w:endnote
w:type="separator"><w:p><w:r><w:separator/></w:r></w:p></w:endnote><w:
endnote
w:type="continuation-separator"><w:p><w:r><w:continuationSeparator/></w:
r></w:p></w:endnote></w:endnotePr><w:compat><w:breakWrappedTables/><w:
snapToGridInCell/><w:wrapTextWithPunct/><w:useAsianBreakRules/><w:
dontGrowAutofit/></w:compat></w:docPr><w:body><wx:sect><ns0:document><w:
p><w:pPr><w:pStyle
w:val="Heading1"/></w:pPr><w:r><w:t>Headline</w:t></w:r></w:p><aml:
annotation aml:id="0" w:type="Word.Comment.Start"/><w:p><w:r><w:t>This
is a paragraph </w:t></w:r><aml:annotation aml:id="0"
w:type="Word.Comment.End"/><w:r><w:rPr><w:rStyle
w:val="CommentReference"/></w:rPr><aml:annotation aml:id="0"
aml:author="Simon St.Laurent" aml:createdate="2003-02-20T11:38:00Z"
w:type="Word.Comment"
w:initials="SSL"><aml:content><w:p><w:pPr><w:pStyle
w:val="CommentText"/></w:pPr><w:r><w:rPr><w:rStyle
w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r><w:r><w:t>This
is pretty boring, don't you
think?</w:t></w:r></w:p></aml:content></aml:annotation></w:r><w:r><w:t>
of "</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body text.
This is a paragraph of "</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body text.
This is a paragraph of "</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body text.
This is a paragraph of "</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body text.
This is a </w:t></w:r><aml:annotation aml:id="1" aml:author="Simon
St.Laurent" aml:createdate="2003-02-20T11:38:00Z"
w:type="Word.Deletion"><aml:content><w:r><w:delText>paragraph
</w:delText></w:r></aml:content></aml:annotation><aml:annotation
aml:id="2" aml:author="Simon St.Laurent"
aml:createdate="2003-02-20T11:38:00Z"
w:type="Word.Insertion"><aml:content><w:r><w:t>new bit
</w:t></w:r></aml:content></aml:annotation><w:r><w:t>of
"</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body text.
</w:t></w:r><ns0:hilite><w:r><w:t>This is a paragraph of
"</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body
text.</w:t></w:r></ns0:hilite><w:r><w:t> This is a paragraph of
"</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body text.
This is a paragraph of "</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body text.
This is a paragraph of "</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body text.
This is a paragraph of "</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body text.
This is a paragraph of "</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body text.
This is a paragraph of "</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body text.
This is a paragraph of "</w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>" body
text</w:t></w:r><w:r><w:rPr><w:rStyle
w:val="FootnoteReference"/></w:rPr><w:footnote><w:p><w:pPr><w:pStyle
w:val="FootnoteText"/></w:pPr><w:r><w:rPr><w:rStyle
w:val="FootnoteReference"/></w:rPr><w:footnoteRef/></w:r><w:r><w:t> This
is a
footnote.</w:t></w:r></w:p></w:footnote></w:r><w:r><w:t>.</w:t></w:r></w
:p><w:p/><w:p/><w:p/><w:p><w:pPr><w:spacing w:before="240" w:after="240"
w:line="360" w:line-rule="auto"/><w:ind w:left="360"
w:right="720"/></w:pPr><w:r><w:t>This is a </w:t></w:r><st1:place
w:st="on"><w:r><w:t>Normal</w:t></w:r></st1:place><w:r><w:t>
</w:t></w:r><ns0:hilite><w:r><w:t>paragraph</w:t></w:r></ns0:hilite><w:r
><w:t> with extra spacing added around it.
</w:t></w:r></w:p><w:p><w:r><w:t>A graphic follows:
</w:t></w:r><w:r><w:pict><v:shapetype id="_x0000_t75"
coordsize="21600,21600" o:spt="75" o:preferrelative="t"
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"><v:stroke
joinstyle="miter"/><v:formulas><v:f eqn="if lineDrawn pixelLineWidth
0"/><v:f eqn="sum @0 1 0"/><v:f eqn="sum 0 0 @1"/><v:f eqn="prod @2 1
2"/><v:f eqn="prod @3 21600 pixelWidth"/><v:f eqn="prod @3 21600
pixelHeight"/><v:f eqn="sum @0 0 1"/><v:f eqn="prod @6 1 2"/><v:f
eqn="prod @7 21600 pixelWidth"/><v:f eqn="sum @8 21600 0"/><v:f
eqn="prod @7 21600 pixelHeight"/><v:f eqn="sum @10 21600
0"/></v:formulas><v:path o:extrusionok="f" gradientshapeok="t"
o:connecttype="rect"/><o:lock v:ext="edit"
aspectratio="t"/></v:shapetype><w:binData
w:name="http://03000001.png";>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAABl0RVh0
U29m
dHdhcmUATWljcm9zb2Z0IE9mZmljZX/tNXEAAAAvSURBVDhPY2Rg+
M9ACmAiRTFI7agGYkKMQCj9
x4gk7Brg6hgZ0W0FCozGNMGoAACuXgYbdYtIBAAAAABJRU5ErkJggk==
</w:binData><v:shape id="_x0000_i1026" type="#_x0000_t75"
style="width:12pt;height:12pt"><v:imagedata src="http://03000001.png";
o:href="bluesplotch.bmp"/></v:shape></w:pict></w:r></w:p><w:p/><w:tbl><w
:tblPr><w:tblStyle w:val="TableGrid"/><w:tblW w:w="0"
w:type="auto"/><w:tblLook
w:val="000001E0"/></w:tblPr><w:tblGrid><w:gridCol w:w="2952"/><w:gridCol
w:w="2952"/><w:gridCol
w:w="2952"/></w:tblGrid><w:tr><w:tc><w:tcPr><w:tcW w:w="2952"
w:type="dxa"/></w:tcPr><w:p><w:r><w:t>Column Header
One</w:t></w:r></w:p></w:tc><w:tc><w:tcPr><w:tcW w:w="2952"
w:type="dxa"/></w:tcPr><w:p><w:r><w:t>Column Header
Two</w:t></w:r></w:p></w:tc><w:tc><w:tcPr><w:tcW w:w="2952"
w:type="dxa"/></w:tcPr><w:p><w:r><w:t>Column Header
Three</w:t></w:r></w:p></w:tc></w:tr><w:tr><w:tc><w:tcPr><w:tcW
w:w="2952"
w:type="dxa"/></w:tcPr><w:p><w:r><w:t>B1</w:t></w:r></w:p></w:tc><w:tc><
w:tcPr><w:tcW w:w="2952"
w:type="dxa"/></w:tcPr><ns0:hilite><w:p><w:r><w:t>B2</w:t></w:r></w:p></
ns0:hilite></w:tc><w:tc><w:tcPr><w:tcW w:w="2952"
w:type="dxa"/></w:tcPr><w:p><w:r><w:t>B3</w:t></w:r></w:p></w:tc></w:tr>
<w:tr><w:tc><w:tcPr><w:tcW w:w="2952"
w:type="dxa"/></w:tcPr><w:p><w:r><w:t>C1</w:t></w:r></w:p></w:tc><w:tc><
w:tcPr><w:tcW w:w="2952"
w:type="dxa"/></w:tcPr><w:p><w:r><w:t>C2</w:t></w:r></w:p></w:tc><w:tc><
w:tcPr><w:tcW w:w="2952"
w:type="dxa"/></w:tcPr><w:p><w:r><w:t>C3</w:t></w:r></w:p></w:tc></w:tr>
</w:tbl><w:p/><w:p><w:r><w:rPr><w:noProof/></w:rPr></w:r><w:r><w:pict><v
:group id="_x0000_s1027" editas="canvas"
style="width:378.8pt;height:45.75pt;mso-position-horizontal-relative:
char;mso-position-vertical-relative:line" coordorigin="2993,7983"
coordsize="6314,784"><o:lock v:ext="edit" aspectratio="t"/><v:shape
id="_x0000_s1026" type="#_x0000_t75"
style="position:absolute;left:2993;top:7983;width:6314;height:784"
o:preferrelative="f"><v:fill o:detectmouseclick="t"/><v:path
o:extrusionok="t" o:connecttype="none"/><o:lock v:ext="edit"
text="t"/></v:shape><v:rect id="_x0000_s1028"
style="position:absolute;left:3000;top:7989;width:6300;height:771"/><v:
shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202"
path="m,l,21600r21600,l21600,xe"><v:stroke joinstyle="miter"/><v:path
gradientshapeok="t" o:connecttype="rect"/></v:shapetype><v:shape
id="_x0000_s1029" type="#_x0000_t202"
style="position:absolute;left:3450;top:8143;width:5100;height:463"><v:
textbox
style="mso-next-textbox:#_x0000_s1029"><w:txbxContent><w:p><w:r><w:t>
This is a text box inside the
drawing.</w:t></w:r></w:p></w:txbxContent></v:textbox></v:shape><v:line
id="_x0000_s1030" style="position:absolute" from="3150,8297"
to="4500,8606"><v:stroke endarrow="block"/></v:line><v:line
id="_x0000_s1031" style="position:absolute;flip:x" from="7800,8143"
to="8700,8606"><v:stroke endarrow="block"/></v:line><w10:wrap
type="none"/><w10:anchorlock/></v:group></w:pict></w:r></w:p></ns0:
document><w:sectPr><w:pgSz w:w="12240" w:h="15840"/><w:pgMar
w:top="1440" w:right="1800" w:bottom="1440" w:left="1800" w:header="720"
w:footer="720" w:gutter="0"/><w:cols w:space="720"/><w:docGrid
w:line-pitch="360"/></w:sectPr></wx:sect></w:body></w:wordDocument>
------------------------------------------------------------------




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS