Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8207369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:58:20+00:00 2026-06-07T08:58:20+00:00

I have to write xslt to wordml (2007) documents. There are hyperlinks like below.

  • 0

I have to write xslt to wordml (2007) documents. There are hyperlinks like below.

< w:p w:rsidR="00FD086A" w:rsidRDefault="00425A76" w:rsidP="00FD086A">
< w: hyperlink r:id="rId4" w:history="1">
< w:r w:rsidR="00FD086A" w:rsidRPr="00425A76">
< w:rPr>
< w:rStyle w:val="Hyperlink"/>
< /w:rPr>
< w:t>google</w:t>
< /w:r>
< /w:hyperlink>
< /w:p>

I want to get the url for the link name. In here I want to get the url for the “google” link. I know its there in Relationships, but I can’t access that with xslt. Does anybody know? (Probably writing a template?) please help me!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T08:58:22+00:00Added an answer on June 7, 2026 at 8:58 am

    Assuming that the following namespace prefixes are declared:

    xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
    xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage"
    xmlns:rel="http://schemas.openxmlformats.org/package/2006/relationships"
    xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
    

    the following XPath can be used to select the value of the URL using the value of the w:hyperlink/@r:id (hard-coded value of “rId5” in this example):

    /pkg:package
      /pkg:part
         /pkg:xmlData
           /rel:Relationships
             /rel:Relationship[@Id='rId5']/@Target
    

    You could use it in the context of a template matching on the w:hyperlink to produce an HTML anchor element, like this:

    <xsl:template match="w:hyperlink">
        <a href="{/pkg:package
                    /pkg:part
                      /pkg:xmlData
                        /rel:Relationships
                          /rel:Relationship[@Id=current()/@r:id]/@Target}">
            <xsl:apply-templates/>
        </a>
    </xsl:template>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following situation: There is a tool that gets an XSLT from
We have xml documents that contain lots of flagged nodes like isProduct, isActive ,
I have to write an XSLT to convert a XML file into another XML
I have an XSLT file that is used to write to my Web.Config as
I have write this code but it does work only if I am already
I have write my own view Bar, which extends LinearLayout . My bar has
I am trying to check if I have write access to a specific key
I'm working on an application so i have write an dll which contain a
I'm writing a simple web app in PHP that needs to have write access
qichunren@zhaobak:~> gem install hpricot ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.