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 6736629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:09:10+00:00 2026-05-26T11:09:10+00:00

This is a re-work/new question after I got my previous one quite wrong by

  • 0

This is a re-work/new question after I got my previous one quite wrong by asking about the wrong element so here goes…

I’m trying to match and hide a xref within the following p element with the attribute of LC LRCaseName:

<p outputclass="LC LRCaseName"><i>Naseem Akhtar v Birmingham City Council</i> [2011] EWCA Civ 383 <xref href="#Public_PUBLICLAW_PLLR_2011PLLR002">Click here for transcript</xref></p>

so that I end up with “Naseem Akhtar v Birmingham City Council [2011] EWCA Civ 383“

We have other xrefs within other p outputclasses that we need to display otherwise I would hide it with <xsl:template match="p/xref"/> as per Dimitre Novatchev ‘s suggestion.

This particular xref will always contain “Click here for transcript” but the href will vary.

thanks.

EDIT:

I have tried the following code which doesn’t make the xref background red:

<xsl:template match="p[@outputclass='LC LRCaseName']/xref">
    <fo:block background-color="red" >
        <xsl:apply-templates/>
    </fo:block>
</xsl:template> 

but if I use this:

<xsl:template match="p[@outputclass='LC LRCaseName']">
    <fo:block background-color="red" >
        <xsl:apply-templates/>
    </fo:block>
</xsl:template> 

It does make the entire P element background red and that includes the xref portion.

EDIT 2:

I have just had a thought, this system has another xsl file that has matches for xref. I’m wondering if my changes are being over-written by this file. Let me look into this further.

EDIT 3:

Just placed this very same code

<xsl:template match="p[@outputclass='LC LRCaseName']/xref" />

into dita2fo-links.xsl rather than the current file I was working on (dita2fo-elems.xsl) and it worked straight away. Obviously the links file is processed after the elems and all my matching was being overwritten by the later template matches.

  • 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-05-26T11:09:10+00:00Added an answer on May 26, 2026 at 11:09 am

    Your match selector for the xref element could include the attribute value as well, like the following one:

    p[@outputclass = 'LC LRCaseName']/xref
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

TLDR: Started with this question simplified it after got some of it working and
I'm still quite new to ASP.Net MVC, so maybe this is a stupid question.
This is closely related to my previous question , which was about using CMake
this is a follow up question from my previous one. you can find it
So I have a custom event like this: Work w = new worker() w.newStatus
Why does this work: List<?> list = new LinkedList<Integer>(); while this gives a type
Why won't this work? public static int[] GetListOfAllDaysForMonths() { static int[] MonthDays = new
Why doesn't this work? The program stops on: this.textBox1.Text = (New text); Thread demoThread;
Hi this seems like it should work, from something in collectionofsomestuff select new SelectListItem(){Text
This may well be simple, but I'm new to Drupal. The organization I work

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.