1. Open Word application;
2. Click File>Open>xmlword_ForSale.xml
#?xml version="1.0" encoding="UTF-8" ?>
#listings>
#listing>
#status>For Sale#/status>
#address>1234 Country Lane#/address>
#beds>3#/beds>
#baths>2#/baths>
#sqft>2000#/sqft>
#price>189,000#/price>
#description>Family-friendly rambler on a quiet street near schools and shopping.#/description>
#/listing>
#listing>
#status>For Sale#/status>
#address>78 Main Street#/address>
#beds>2#/beds>
#baths>1#/baths>
#sqft>1000#/sqft>
#price>120,000#/price>
#description>In-town condo with all the amenities. Convenient to dining, theaters and bus line.#/description>
#/listing>
#listing>
#status>For Sale#/status>
#address>456 Elm Street#/address>
#beds>4#/beds>
#baths>2#/baths>
#sqft>2500#/sqft>
#price>200,000#/price>
#description>Craftsman bungalow, lovingly restored. Quality details throughout, surrounded by lovely garden.#/description>
#/listing>
#/listings>
3. Click arrow by Open button;
4. Click Open with Transform to locate XLS files;
5. Double-click the XLS file, xmlword_table.xsl
#?xml version="1.0"?>
#xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
#xsl:output method="html" version="4.0"/>
#xsl:template match="/">
#html>
#head>
#title>
For Sale
#/title>
#style>
/* This styles are set for IE 4.02 and up */
/* BODY = default paragraph font */
body {bgcolor: #ffffff; font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 100%; }
/* Heading styles---------------------------------------------------------------------------- */
h1 {font-size: 175%; margin-top: .4em; margin-bottom: .5em;}
h2 {font-size: 160%; margin-top: 2em; margin-bottom: .5em;}
h3 {font-size: 150%; margin-top: 1.2em; margin-bottom: .5em; font-weight: bold;}
h4 {font-size: 125%; margin-top: 1.2em; font-weight: bold;}
h5 {font-size: 100%; margin-top: 1.2em; font-weight: bold;}
.lproch {font-weight: bold ;margin-top: 1.2em; }/* Heading 9,List Procedure Heading,lproch */
/* LISTS */
ol {font-size: 100%; margin-top: .5em; margin-bottom: 0em; margin-left: 4em;}
ul {font-size: 100%; margin-top: .5em; margin-bottom: 0em;}
ol ul {list-style: disc; margin-top: .5em;}
ul ul {list-style: disc; margin-top: .5em;}
li {margin-bottom: .7em; margin-left: -2em;}
/* PREFORMATTING - CODE */
pre {font-size: 100%; margin-top: 1.2em; margin-bottom: 1.5em;}
code {font-family: "courier new", courier; font-size: 125%; }
/* TABLES */
table {font-size: 100%; margin-top: 1em; margin-bottom: 0em;}
th {text-align: left; background: #CCCCCC; margin: .25em; vertical-align: bottom;}
tr {vertical-align: top;}
td {margin: .25em; vertical-align: top; border-bottom: 1 solid #CCCCCC; }
/* PARAGRAPH */
p {margin-top: .6em; margin-bottom: .6em; }
#/style>
#/head>
#body>
#table>
#tr>
#th>Address#/th>
#th>Size (sq. ft.)#/th>
#th>Bedrooms#/th>
#th>Bathrooms#/th>
#th>Price#/th>
#/tr>
#xsl:for-each select="listings/listing">
#tr ALIGN="LEFT" VALIGN="TOP">
#td>
#xsl:value-of select="address"/>
#/td>
#td>
#xsl:value-of select="sqft"/>
#/td>
#td>
#xsl:value-of select="beds"/>
#/td>
#td>
#xsl:value-of select="baths"/>
#/td>
#td>
$#xsl:value-of select="price"/>
#/td>
#/tr>
#/xsl:for-each>
#/table>
#/body>
#/html>
#/xsl:template>
#/xsl:stylesheet>
6. or xmlword_flyer.xsl
#?xml version="1.0" encoding="UTF-8" standalone="yes"?>
#xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
#xsl:template match="/">
#w:wordDocument xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" w:macrosPresent="no"
w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve">
#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:fonts>
#w:styles>
#w:versionOfBuiltInStylenames w:val="4"/>
#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:pPr>
#w:spacing w:after="240"/>
#/w:pPr>
#w:rPr>
#w:rFonts w:ascii="Verdana" w:h-ansi="Verdana"/>
#wx:font wx:val="Verdana"/>
#w:sz w:val="28"/>
#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:pPr>
#w:pStyle w:val="Heading1"/>
#w:keepNext/>
#w:spacing w:before="240" w:after="480"/>
#w:outlineLvl w:val="0"/>
#/w:pPr>
#w:rPr>
#w:rFonts w:ascii="Impact" w:h-ansi="Impact" w:cs="Arial"/>
#wx:font wx:val="Impact"/>
#w:b/>
#w:b-cs/>
#w:kern w:val="32"/>
#w:sz w:val="96"/>
#w:sz-cs w:val="32"/>
#/w:rPr>
#/w:style>
#w:style w:type="paragraph" w:styleId="Heading2">
#w:name w:val="heading 2"/>
#wx:uiName wx:val="Heading 2"/>
#w:basedOn w:val="Normal"/>
#w:next w:val="Normal"/>
#w:pPr>
#w:pStyle w:val="Heading2"/>
#w:keepNext/>
#w:spacing w:before="60" w:after="60"/>
#w:outlineLvl w:val="1"/>
#/w:pPr>
#w:rPr>
#w:rFonts w:cs="Arial"/>
#wx:font wx:val="Verdana"/>
#w:b/>
#w:b-cs/>
#w:i/>
#w:i-cs/>
#w:sz w:val="36"/>
#w:sz-cs w:val="28"/>
#/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:styles>
#w:docPr>
#w:view w:val="print"/>
#w:zoom w:percent="75"/>
#w:doNotEmbedSystemFonts/>
#w:proofState w:spelling="clean" w:grammar="clean"/>
#w:attachedTemplate w:val=""/>
#w:defaultTabStop w:val="720"/>
#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:compat>
#w:breakWrappedTables/>
#w:snapToGridInCell/>
#w:wrapTextWithPunct/>
#w:useAsianBreakRules/>
#w:useWord2002TableStyleRules/>
#/w:compat>
#/w:docPr>
#w:body>
#xsl:for-each select="listings/listing">
#wx:sect>
#w:p>
#w:pPr>
#w:pStyle w:val="Heading1"/>
#/w:pPr>
#w:r>
#w:rPr>
#w:noProof/>
#/w:rPr>
#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="wordml://08000001.wmz">H4sIAAAAAAACC21SXUiTURg+O2tqNM//z4cYfJCISU0tS4hudGQpWld9pQRmaw0zCkYzW9hVEOGN
RKBIQTC6CqKbqKRaRHhX0pUiW2FEFFQMirkkWOf75jTCAw/vc85z3vc87+GdfzM7DUA2mGfHBLS+
+IFZ1zt9YDMA/qs+ADYBxz0CAYMtMM+yQZcFYTCQrNxqWH0FBk2g9+Dxrn12JB4dvBg9bZ+6bPcO
ReIXYvHBM6M77K7zkZDdGxuNxaP2SEuoudmtasr7qjasWmnYH+g9Cks3dxofVSauwABYXbB07vPc
1fm3A4bishYNywYUkXtQvzyAjkgHheUQ2ivHUIO8iWpkGq2IHFoQDp4Qz/Ah8R3XixpSIZrIMg+T
r9whGR4j7/glMsuvked8gjzi0+QBT5PX/DPJckJ/8/1Ui0nqiJ90StjsqehhC2KELYs7TMhXLCQ/
sU4Jeb8kPCJr+bABtBhyEZfI8xoAL0kjv03y7H1wXPqq09Ldl7WE4VNGc8S43C3SMvGPNsPa+Qxr
5NqDy9vXtBQbECl2mLd5cPmAKP9ksVhc+0kIdnkZGtyj0JqkBX2D/tDn6KJuoQ/1E3JCj5FWHSZI
V5Nv6hfOqAx+q+bwvHqBP6r7OKdu4aK6gok+ibfpDtym63CPtkyHFgJWigLLrVt2xdBR/QErBUm3
YuiudvfrjqG1aLTHuFu1MpPL1vMKtE8VaIdyPLi8T5W1JZrUS/SsSnhweVJv1KnfiznTcSmWZwj8
N0NgVfcBb/jBX7aWQcMSAwAA
#/w:binData>#v:shape id="_x0000_s1026" type="#_x0000_t75" style="position:absolute;margin-left:-36pt;margin-top:-261pt;width:289.7pt;height:549pt;z-index:1" filled="t" fillcolor="window">#v:imagedata src="wordml://08000001.wmz" o:title=""/>#w10:wrap type="square"/>#/v:shape>#/w:pict>
#/w:r>
#w:r>
#w:t>#xsl:value-of select="status"/>#/w:t>
#/w:r>
#/w:p>
#w:p>#w:r>#w:t>#xsl:value-of select="beds"/>-bedroom, #xsl:value-of select="baths"/>-bath home.#/w:t>#/w:r>#/w:p>
#w:p>#w:r>#w:t>#xsl:value-of select="description"/>#/w:t>#/w:r>#/w:p>
#w:p>#w:r>#w:t>Priced at just:#/w:t>#/w:r>#/w:p>
#w:p>#w:pPr>#w:pStyle w:val="Heading2"/>#/w:pPr>#w:r>#w:t>$#xsl:value-of select="price"/>#/w:t>#/w:r>#/w:p>
#w:sectPr>
#w:pgSz w:w="12240" w:h="15840"/>
#w:pgMar w:top="7200" w:right="1872" w:bottom="1440" w:left="1872" w:header="720" w:footer="720" w:gutter="0"/>
#w:cols w:space="720"/>
#w:docGrid w:line-pitch="360"/>
#/w:sectPr>
#/wx:sect>
#/xsl:for-each>
#/w:body>
#/w:wordDocument>
#/xsl:template>
#/xsl:stylesheet>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment