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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:40:56+00:00 2026-06-08T21:40:56+00:00

I have been using the following xpath selection in xpath 1.0 <xsl:variable name=id><xsl:value-of select=./@id

  • 0

I have been using the following xpath selection in xpath 1.0

<xsl:variable name="id"><xsl:value-of select="./@id" /></xsl:variable>
preceding::exm:messageFlow[@sourceRef = $id]/@targetRef

This worked very well and did exactly what I wanted.
However I started using XSLT 2.0 in combination with xPath 2.0 and this does not work anymore
(Using the Altova XML processor)
I get the following error:

Kann nicht mit Ziel-Typ besetzt werden – Aktuelles Element ist ‘sid-B3FD7EE5-043
3-4939-A69F-E74B30FDEB1C’ vom Typ xs:untypedAtomic, Typ xs:QName erwartet – =

which translates roughly to:

Cannot be set to target-type – Current element is ‘sid-B3FD7EE5-043
3-4939-A69F-E74B30FDEB1C’ of type xs:untypedAtomic, type xs:QName
expected –

Previously I had a similar problem with this selection:

following::exm:*[exm:incoming = $out] | preceding::exm:*[exm:incoming = $out]

Which again worked in xpath 1.0, but returned a similar error in xPath 2.0
After changing it to

following::exm:*[exm:incoming/text() = $out] | preceding::exm:*[exm:incoming/text() = $out]

It worked in xPath 2.0 as well. I did try doing something similar with the attributes, but it did not work

A small extract of the corresponding XML:

<messageFlow id="sid-80B618A4-E6BF-4438-AF5D-5111AD308FE6" name="" sourceRef="sid-B3FD7EE5-0433-4939-A69F-E74B30FDEB1C" targetRef="sid-6EB2DB76-CC19-48AD-A073-D37C7489F211"/>
<task completionQuantity="1" id="sid-B3FD7EE5-0433-4939-A69F-E74B30FDEB1C" isForCompensation="false" name="call service" startQuantity="1">
     <incoming>sid-2B2BA651-B5BA-4195-9B5B-E6855B1138F4</incoming>
     <incoming>sid-DA4B86E8-C3F2-497C-8C0D-218E95CE9FD1</incoming>
     <outgoing>sid-008948DE-BA59-4897-AC37-2C3AA63DCD82</outgoing>
</task>
  • 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-08T21:40:57+00:00Added an answer on June 8, 2026 at 9:40 pm

    I wonder if you have a schema that declares the @id attribute as being of type QName?

    With this variable declaration:

    <xsl:variable name="id"><xsl:value-of select="./@id" /></xsl:variable>
    

    you are creating a copy of the @id attribute in a new result tree fragment. This is quite unnecessary; your needs would almost certainly be better served by making the variable be simply a reference to the existing attribute, thus:

    <xsl:variable name="id" select="@id" />
    

    By making the copy, you are not only writing unnecessary code and incurring unnecessary run-time cost (building a new tree is an expensive operation), but you are also losing the type information. If my conjecture is correct that @id is of type xs:QName, then the variable $id after atomization will be of type xs:untypedAtomic, and comparing it to an xs:QName is likely to fail with a message similar to the one cited.

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

Sidebar

Related Questions

I have been using the following to put a default value in a textfield
I have been using the following sort: var query = _cityRepository.GetAll( .OrderBy(item => item.RowKey.Substring(0,
I have been using the following CSS to apply an effect at the bottom
I have been using the following to add a dynamic link on a page
I am using the following code for the Share Price Application I have been
I have been following the following post on using multiple ItemTemplates in a ListView
I have been doing some research for using MSMQ. Following 2 gave me fundamental
Following the standard instruction for using AES algorithm, I have not been able to
I have been using the following command to open another MDB Access file via
I have been using the following regular expression in ASP.NET and Javascript: [a-zA-ZöäüÖÄÜß0-9]{1}[a-zA-ZöäüÖÄÜß0-9_.\-]{2,14}[a-zA-ZöäüÖÄÜß0-9.!]{1} Now,

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.