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

  • SEARCH
  • Home
  • 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 8626581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:04:03+00:00 2026-06-12T08:04:03+00:00

I have some XSLT which is used to select text which has a particular

  • 0

I have some XSLT which is used to select text which has a particular keyword <sliceXML> This works fine and grabs each paragraph in turn. I also want to select the contents of the page tag <pg> and display it.

However it keeps selecting the value of the first <pg> tag and does not move onto the next. Any help is much appreciated.

My XML

<para>
    <sliceXML>telescope</sliceXML>
    A telescope test can be used to observe the night sky. What
    observations can you make about the universe from your own back yard?
    <pg>Page: 77</pg>
 </para>

 <para>
    <sliceXML>telescope</sliceXML>
    The scientists using the Sloan Digital Sky Survey telescope can
    gather far more information than they can review quickly. Humans are
    better at galaxy identification than computers. Why might this be a
    difficult task for computers?
    <pg>Page 78</pg>
 </para>

NOTE: Page 77 and Page 78

My XSLT

<xsl:template name="para">
    <div id="para">
        <xsl:copy-of select="text()"/>
    <span class="pagetag">
        <xsl:value-of select="//pg"/><img src="images/arrows.png" height="12px"/>
    </span>
    </div>
</xsl:template>

My Current Results

A telescope test can be used to observe the night sky. What observations can you make about the universe from your own back yard? Page: 77

The scientists using the Sloan Digital Sky Survey telescope can gather far more information than they can review quickly. Humans are better at galaxy identification than computers. Why might this be a difficult task for computers? Page: 77

My Desired Results

A telescope test can be used to observe the night sky. What observations can you make about the universe from your own back yard? Page: 77

The scientists using the Sloan Digital Sky Survey telescope can gather far more information than they can review quickly. Humans are better at galaxy identification than computers. Why might this be a difficult task for computers? Page: 78

Thanks

  • 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-12T08:04:04+00:00Added an answer on June 12, 2026 at 8:04 am

    Maybe you should try pg instead of //pg? Because you want the pg that is a child of your para.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some pretty basic Javascript here which works just fine in Firefox but
I have some very simple xml and xslt documents, which render in IE8 in
I have a bit of XSLT which is performing some magic on integer database
I have a following xslt: <span><xsl:text disable-output-escaping=yes><![CDATA[&nbsp;Some text]]></xsl:text></span> After transformation I get: <span>&amp;nbsp;Some text</span>
We have an application which has a heirarchical group structure. Some of the groups
I have a table schema which has some meta field data which I need
I have an XML file which has some values in child Element aswell in
I'm looking to do some really simply XSLT on my XML document, which has
Having some strange behavior here. I have some XSLT which generates some html with
At some point in an XSLT program, I have the following: <xsl:for-each select=tags/tag> <xsl:apply-templates

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.