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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:56:26+00:00 2026-05-15T04:56:26+00:00

I am wanting to concatenate two nodeset values using XPath in XForms. I know

  • 0

I am wanting to concatenate two nodeset values using XPath in XForms.

I know that XPath has a concat(string, string) function, but how would I go about concatenating two nodeset values?

BEGIN EDIT:
I tried concat function.. I tried this.. and variations of it to make it work, but it doesn’t

<xf:value ref="concat(instance('param_choices')/choice/root, .)"/>

END EDIT

Below is a simplified code example of what I am trying to achieve.

XForms model:

<xf:instance id="param_choices" xmlns="">
    <choices>
        <root label="Param Choices">/param</root>
        <choice label="Name">/@AAA</choice>
        <choice label="Value">/@BBB</choice>
    </choices>
</xf:instance>

XForms ui code that I currently have:

<xf:select ref="instance('criteria_data')/criteria/criterion" appearance="full">
    <xf:label>Param choices:</xf:label>    
    <br/>
    <xf:itemset nodeset="instance('param_choices')/choice">
        <xf:label ref="@label"></xf:label>
        <xf:value ref="."></xf:value>
    </xf:itemset>
</xf:select>    

(if user selects “Name” checkbox..) the XML output is:

<criterion>/@BBB</criterion>

However! I want to combine the root nodeset value with the current choice nodeset value.

Essentially:

<xf:value ref="concat(instance('param_choices')/choice/root, .)"/>

or

<xf:value ref="(instance('definition_choices')/choice/root) + ."/>

to achieve the following XML output:

<criterion>/param/@BBB</criterion>

Any suggestions on how to do this? (I am fairly new to XPath and XForms)

p.s. what I am asking makes sense to me when I typed it out, but if you have trouble figuring out what I’m asking, just let me know..

thanks!

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

    The evaluation of an XPath expression can not modify the structure/contents of an XML document — it only selects (a set of) existing nodes.

    In order to produce a node that doesn’t exist in the XML document, one must use other means in conjunction with XPath (such as XSLT).

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

Sidebar

Ask A Question

Stats

  • Questions 531k
  • Answers 531k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I would use this method http://developer.android.com/guide/developing/tools/ddms.html#emulator-control. Haven't tried this one:… May 16, 2026 at 11:50 pm
  • Editorial Team
    Editorial Team added an answer For ruby 1.8.x the only way to avoid the error… May 16, 2026 at 11:50 pm
  • Editorial Team
    Editorial Team added an answer Just store the Bitmap. That's what you're caching and I'm… May 16, 2026 at 11:50 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I often find myself adding either concatonated strings or using a string formatter in
Wanting to check if I missed a setting somewhere, or if I'm just using
I know this is a silly doubt but I just want to make sure
I find myself wanting to write a routine that will operate on both volatile
I'm writing something that summarizes the files in a file system by hashing a
In C#, I find myself occasionally wanting to register a method for an event
Wanting to implement authentication by client certificates I am experiencing some issues. First some
Wanting to integrate aspects of SharePoint into an existing website - rather than integrating
Wanting to play with jQuery, Orbited, and FasterCSV, I made a Rails chat application.
Wanting to create custom data annotation validation. Are there any useful guides / samples

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.