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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:32:30+00:00 2026-05-30T12:32:30+00:00

Google turned up nil so here I am. I’m working on an XSLT in

  • 0

Google turned up nil so here I am.

I’m working on an XSLT in Java. This is not the only XSLT in the project, and the others work great. My issue is as follows:

I’m getting a javax.xml.transform.TransformerException with the error message “Could not find function: exists”. My XSLT is as follows:

<?xml version="1.0"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:xpath="http://www.w3.org/2005/xpath-functions" xmlns:java="java" 
xmlns:url="http://whatever/java/java.net.URLEncoder"
exclude-result-prefixes="url">

    <xsl:template match="User">
        <user>
            <id><xsl:value-of select="id"/></id>
            <xsl:if test="exists(first)"><first><xsl:value-of select="first"/></first></xsl:if>
        </user>
    </xsl:template>

</xsl:stylesheet>

The XML input is well formed, and if I remove the <xsl:if test="exists(first)"> line, everything works well.

As mentioned, I have other XSLTs that work well, including some that use the exists function. I checked the namespaces on the two, and they are identical.

Any idea what might be going on?

  • 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-30T12:32:32+00:00Added an answer on May 30, 2026 at 12:32 pm

    i think you can check for the existence of the node just like this

     <xsl:if test="first">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't seem to find any documentation saying this is possible, but Google turned
This seems like a simple thing but google hasn't turned up anything for me:
What is the most mature .NET MPI implementation? A quick google search turned up
Google App Engine is a cloud computing architecture that supports java based web services
Google wasn't my friend this time. This is the closest to a doc I
Google Spreadsheets currently does not support the standard function TDIST - i.e. the Student's
I have this code for logging into Google using Simple DOM Parser with curl.
I have a website that must have javascript turned on so it can work
I used google maps api v3 to add a map to website. I turned
How does an edge preserving smooth work? This is an image filter which blurs

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.