Hi Stewart,

It looks like this is a namespace thing.  The Relationship element
appears to be in the
http://schemas.openxmlformats.org/package/2006/relationships namespace,
and you are looking for it in no namespace.

Try something like this:

declare namespace
rs="http://schemas.openxmlformats.org/package/2006/relationships";

define variable $links { xdmp:zip-get( doc(
"meta-r/sv/themenu/Wikis.docx" ), "word/rels/document.xml.rels",
<options xmlns="xdmp:zip-get"><format>xml</format></options> ) }

<results>
{
for $r in $links//rs:Relationship
return
    <result>{ $r }</result>
}
    <links>{ $links }</links>
</results> 

See if that does the trick.

-Danny

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stewart
Shelline
Sent: Thursday, June 14, 2007 4:52 PM
To: [email protected]
Subject: [MarkLogic Dev General] Unable to open
word/_rels/document.xml.relsfrom Word 2007


In the following code, nothing is returned in the for loop, but I do get
XML within the <links> tag.

=======================
define variable $links { xdmp:zip-get( doc(
"meta-r/sv/themenu/Wikis.docx" ), "word/_rels/document.xml.rels",
<options xmlns="xdmp:zip-get"><format>xml</format></options> ) }

<results>
{
for $r in $links//Relationship
return
    <result>{ $r }</result>
}
    <links>{ $links }</links>
</results> 
=======================

Here is the XML returned from $links:


<Relationships
xmlns="http://schemas.openxmlformats.org/package/2006/relationships";>
    <Relationship Id="rId3"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationship
s/webSettings" Target="webSettings.xml"/>
    <Relationship Id="rId7"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationship
s/theme" Target="theme/theme1.xml"/>
    <Relationship Id="rId2"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationship
s/settings" Target="settings.xml"/>
    <Relationship Id="rId1"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationship
s/styles" Target="styles.xml"/>
    <Relationship Id="rId6"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationship
s/fontTable" Target="fontTable.xml"/>
    <Relationship Id="rId5"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationship
s/hyperlink" Target="http://www.vignette.com"; TargetMode="External"/>
    <Relationship Id="rId4"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationship
s/hyperlink" Target="http://meta.ldschurch.org/sv/themenu/wikis";
TargetMode="External"/>
</Relationships>

What am I missing?

--------------------------------------------------------------
Stewart Shelline
Enterprise Application Architect
The Church of Jesus Christ of Latter-day Saints
50 E. North Temple
Salt Lake City, UT   84150


NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to