Office 2003 and XML

M

Mark Baird

The latest version of Word has a modified INCLUDETEXT field that
allows you to include nodes of data from an XML file and at the same
time use XSL to transform that data. The following generates an error
when I add in the name of the XSL to use.


Mark Baird


{ INCLUDETEXT "c:\\format-number.xml" \t "c:\\format-number.xsl" \x
/root/myNumber }


format-number.xml

<?xml version="1.0" encoding="UTF-8"?>
<root>
<myNumber>136234</myNumber>
</root>


format-number.xsl

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:template match="/">
<xsl:value-of select="format-number(root/myNumber,'###,##0.####')"/>
</xsl:template>
</xsl:stylesheet>
 
B

Bob Buckland ?:-\)

Hi Mark,

You may want to also post this in the Office XML newsgroup,
news://msnews.microsoft.com/microsoft.public.office.xml

Note that Word 2003 standalone and Word 2003 in the Office 2003 Professional edition have XML capabilities not available in Word
2003 in the MS Office 2003 Standard, Student and Teachers, Basic or Small Business Editions.

======
The latest version of Word has a modified INCLUDETEXT field that
allows you to include nodes of data from an XML file and at the same
time use XSL to transform that data. The following generates an error
when I add in the name of the XSL to use.


Mark Baird


{ INCLUDETEXT "c:\\format-number.xml" \t "c:\\format-number.xsl" \x
/root/myNumber }


format-number.xml

<?xml version="1.0" encoding="UTF-8"?>
<root>
<myNumber>136234</myNumber>
</root>


format-number.xsl

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:template match="/">
<xsl:value-of select="format-number(root/myNumber,'###,##0.####')"/>
</xsl:template>
</xsl:stylesheet> <<
--
I hope this helps you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

The Office 2003 System parts explained
http://microsoft.com/uk/office/editions.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top