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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:05:27+00:00 2026-06-10T06:05:27+00:00

I try to validate data in my page. <?xml version=1.0 encoding=UTF-8?> <xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform

  • 0

I try to validate data in my page.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:item="http://www.myspace.com/item"
    xmlns:shop="xalan://my.app.xslt.model.Shop" xmlns:valid="xalan://my.app.xslt.validation.ShopValidator"
    xmlns:exsl="http://exslt.org/common">

I have a model with field, and class validator with methods for checking every field.

And in row

<xsl:if test="valid:isNotEmptyData(shop:getOwner($item)) != true()">
            <error message="The field OWNER is empty." />
        </xsl:if>

I get NoSuchMethodExtension although I have in model

public class Shop{
  private String owner;
  public String getOwner(){
    return owner;
  }
}

And in validator class

public static boolean isNotEmptyData(String model){
  retutn model.isEmpty();
}

Can you help me?

  • 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-10T06:05:29+00:00Added an answer on June 10, 2026 at 6:05 am

    Your method Shop.getOwner() has no arguments, whereas in the XSLT you call it as shop:getOwner($item)) with one argument – the XSLT processor looks for a method with one argument and cannot find it, hence the error.

    I am not sure what getOwner() is supposed to do – possibly to extract some value from its arguments..? In such a case you should modify it to accept an argument and process it.

    By the way,

    valid:isNotEmptyData(shop:getOwner($item)) != true()
    

    can be written using standard XPath functions as

     not(string(shop:getOwner($item)))
    

    (a string is considered true if it is non-empty), or as

    string-length(shop:getOwner($item)) = 0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What's wrong with this code? I'm not able to validate 'data': $.post('http://localhost/do.php', function(data) {
I have iframe inside my page for save data in database.I use validate.js to
In my application i have to validate XML data and pickup all invalid characters
i try to validate the form before submitting the request. i am using jquery
I try to validate the presence of attributes that belong to another model, to
I'm try to validate form using jquery validation plugin my from code: source code
I'm using this to (try) to validate a 'strong' password in ColdFusion 7. if
We are getting following error when we try to validate our app. This bundle
I show UIAlertView with UIAlertViewStylePlainTextInput style. Then I try to validate for empty field
I have a field where people enter their IP. So I try to validate

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.