INCLUDETEXT with XML file: how to get one single element ?

D

Did

Hi.
I just tried the MS example showing how to get an element from a XML file
but I do not have the expected result.

1. The XML input file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<bookstore xmlns="schema.xsd">
<book>
<title>What's New for Office 2003 Developers?</title>
<author>
<first-name>Paul</first-name>
<last-name>Cornell</last-name>
</author>
<price>49.99</price>
</book>
</bookstore>

2. The fields tag:
{ INCLUDETEXT "books_instance.xml" \c xml \n xmlns:ns1='schema.xsd' \x
/ns1:bookstore/ns1:book/ns1:author/ns1:last-name \* MERGEFORMAT }

3. The expected result:
Cornell

4. My result:
What's New for Office 2003 Developers?

Paul
Cornell

49.99

Additional information:
# I am using Word 2003 (MS Office Basic Edition 2003).
# In the MS-example the step by step description to build the INCLUDETEXT
tag is:
1. On the Insert menu, click Field.
2. In the Field names list, select IncludeText.
3. In the Filename or URL box, type the location of the target XML file,
and click OK to include all of the XML data. To include only a portion of
the XML data, continue with the steps 4 through 7.
4. Specify namespace mappings by selecting the Namespace mappings check
box and type the namespace mappings in the accompanying text box.
5. If you want to transform the XML file's data before you include it in
the document, select the XSL transform file check box and type the location
of the target XSL transform file.
6. Check the XPath expression check box and type an XPath expression,
including namespaces if needed.
7. Click OK to include the XML data.
On my version, there is no "Namespace mappings" check/text box, no "XSL
transform file" check/text box and no "XPath expression" check/text box,
therefore I was unable to perform step 4, 5 and 6. I just manually complete
the INCLUDETEXT tag with the relevant data.

Thanks for help.
Did.

PS: This note has also been posted on microsoft.public.office.xml (no answer
until now).
 

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