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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:28:32+00:00 2026-05-27T04:28:32+00:00

In XSL I am accessing an XML file which contains a config variable which

  • 0

In XSL I am accessing an XML file which contains a config variable which is used in the stylesheet using the document function.

<xsl:variable name="files" select="document(concat('../../../', utils:Replace(./@src, '/groceries/MarketingContent/', 'MarketingContent/'), '.xml'))/Files" />

<xsl:call-template name="script">
                    <xsl:with-param name="src" select="concat('/groceries/',$files/@outputPath,'/', utils:Replace($files/File/@name, '.js', concat('.', $files/@hashKey, '.js')))"/>
                  </xsl:call-template>

The problem is if this xml document does not exists I get an error, rendering the website unuable.

I am using version 1.0, is there a way to check that a file exists so as to deal with this issue gracefully??

Thanks in advance

  • 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-27T04:28:32+00:00Added an answer on May 27, 2026 at 4:28 am

    There’s no way of doing this in XSLT 1.0 without processor-specific extensions.

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

Sidebar

Related Questions

I have a simple XSL file which looks like: <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform version=1.0>
I have an xsl page which uses <xsl:variable name=pos select=Position()/> in the onchange events
I'm practicing some XSL and using this XML document as a simple example: <?xml
I have 3 XSL files which have paths in them to something like C:\templates\Test\file.pdf
I'm using Xsl transformation to display an Xml data as Html. <xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform
I am using XSL to configure my XML file into a smaller XML. My
I have developed an XSL file that transforms xml files into a html table.
I'm using XSL-FO with Apache FOP to take a sexy looking XML file and
I have a xsl file that is grabbing variables from xml and they seem
I am using XSL transform on XML. Some part of transform are dependent on

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.