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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:51:04+00:00 2026-06-06T07:51:04+00:00

I am working with XML files that are generated by a digital video camera.

  • 0

I am working with XML files that are generated by a digital video camera. The camera allows the user to save all of the camera’s settngs to an SD card so that the settings can be recalled or loaded into another camera. The XSL stylesheet I am writing will allow users to view the camera’s settings, as saved to the SD card in a web browser.

While most of the values in the XML file — as formatted by my stylesheet — make sense to humans, some do not. What I would like to do is have the stylesheet display text that is based on the value in the XML file but more easily understood by humans.

My sample XML file may be viewed here: http://josephthomas.info/Alexa/Setup_120511_140322.xml

A few lines down the page you will see:

Color GAMMA-SxS    Rec_Log

While “Rec_Log” is a value that the cameras understand, it is not a value that the camera’s users will understand. What I would like for the stylesheet to do is to display “LogC” instead.

In the XML file this value is defined thusly:

<DteLut lowerLimit="0" upperLimit="2">Rec_Log</DteLut>

The XSL formatting the sample page for this value is:

<tr>
  <td class="title_column">Color GAMMA-SxS</td><td><xsl:value-of select="Settings/Groups/Recording/DteLut"/>
  </td>
</tr>

So what I hope to do is have “LogC” displayed on the page rather than Rec_Log.

It seems to me that the “when” conditional statement is the correct approach, but I am not familiar enough with the syntax to cause this to happen. There are other values in the XML file that want replacing but the above is a good example of my mission.

  • 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-06T07:51:05+00:00Added an answer on June 6, 2026 at 7:51 am

    What you could do is make use of make use of template matching, to match the exceptions to what you want to change. Firstly, add the following template to your XSL

    <xsl:template match="DteLut[. = 'Rec_Log']">
       <xsl:text>LogC</xsl:text>
    </xsl:template>
    

    Then, instead of the following line

    <xsl:value-of select="Settings/Groups/Recording/DteLut"/>
    

    Do the following line

    <xsl:apply-templates select="Settings/Groups/Recording/DteLut"/>
    

    When the value of*DteLut* is “Rec_Log”, then the custom template will be matched to output “LogC” instead. When there is not a match, the default behaviour will kick in which will be to just output the text value as-is.

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

Sidebar

Related Questions

I'm working on some code that deals with parsing files (mainly XML, but there
I'm working with a xml file that is generated and used in a .NET
I am working on creating a Java class to map an XML file that
I'm working on some code that loads an xml file at run time. At
I'm working on a project involving some large XML files (from 50MB to over
I'm working on a windows phone project where I have some xml files with
I am working on xml and xsd files in VS 2010 but intellisense isn't
Again a simple thing. I have a stylesheet that parses XML and XSL files.
I want to show my users the xml that gets generated for a certain
I am working on an application in which, i have to read XML files

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.