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.

Thanks.

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>
 
C

Cindy M -WordMVP-

Hi Mark,
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.
As I recall, you need to include a namespace in the xml file
and use that namespace when referencing the XML. Take a look
at the example in the Word help for the IncludeText field
code.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

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