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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:38:08+00:00 2026-06-10T11:38:08+00:00

Using XSLT 2.0: @ Linenumber 8370 this code: <TestCaseElement> <Name><![CDATA[DUT_AC_ON]]></Name> <TaggedValues> </TaggedValues> <Description> <Line><![CDATA[{TEXT_LANG}

  • 0

Using XSLT 2.0:

@ Linenumber 8370 this code:

<TestCaseElement>
            <Name><![CDATA[DUT_AC_ON]]></Name>
            <TaggedValues>
            </TaggedValues>
            <Description>
                <Line><![CDATA[{TEXT_LANG} DUT AC ON]]></Line>
                <Line><![CDATA[{TEXT_ENGL} DUT AC ON]]></Line>
            </Description>
            <ModelingToolID><![CDATA[EAID_E9ACC0C9_D383_4ef0_99FF_F87C90BDF43C]]></ModelingToolID>
            <Hash><![CDATA[1238228468]]></Hash>
            <ID><![CDATA[1115]]></ID>
            <Stereotypes>
                <Stereotype><![CDATA[StepStart]]></Stereotype>
            </Stereotypes>
            <Role><![CDATA[TESTSTEP]]></Role>

</TestCaseElement>

and later in the XML-Document the same ModelingToolID

Here is an external Link to the picture to visualize: https://i.stack.imgur.com/vOFNz.png

I generate ID’s with this XSL-Code:

<xsl:for-each select="/TestCases/TestCase/TestCaseElement/ModelingToolID[  
 ( not( ../Stereotypes ) or ( ../Stereotypes/Stereotype != 'Precondition' and
  ../Stereotypes/Stereotype != 'Postcondition' ) ) and 
 (../Stereotypes/Stereotype = 'StepStart') and 
 ( ../Role = 'TESTSTEP' or ../Role = 'VP' )  and 
 ../Description and 
 ( generate-id() = generate-id( key( 'ModelingToolID', .)[ 1 ] ) ) ]">

You see in Linenumber 8370 and 10296 two identic ModelingToolID’s.
I need both TestCaseElements in my Transformation and in my desired output.
But, understandably, only the first will be taken.
What can i do to get both TestCaseElement’s?

  • 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-10T11:38:10+00:00Added an answer on June 10, 2026 at 11:38 am

    You see in Linenumber 8370 and 10296 two identic ModelingToolID‘s.
    I need both TestCaseElements in my Transformation and in my desired
    output. But, understandably, only the first will be taken. What can
    i do to get both TestCaseElement’s?

    The function key() (without a predicate appended to it) by definition produces a node-set of nodes, each having the same key as the second argument.

    Therefore, inside the xsl:for-each instruction you need:

    key( 'ModelingToolID', .)
    

    This selects all nodes that match the match pattern in the match attribute of the xsl:key named "ModelingToolID" — exactly what you want to obtain.

    You can use this expression in various XSLT instructions:

    <xsl:variable name="vGroup" select="key( 'ModelingToolID', .)"/>
    

    Or:

    <xsl:for-each select="key( 'ModelingToolID', .)">
      <!-- Process the group here  -->
    </xsl:for-each>
    

    Or whatever you need to do.

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

Sidebar

Related Questions

I'm using XSLT and would like to transform this: <attr> <header name=UpdateInformation1> <detail name=info>blah</detail>
I'm starting using XSLT and write this scipt: <?xml version=1.0 encoding=ISO-8859-1?> <xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform>
This is follow-up to: using xslt to create an xml file in c <element1
This is my first time using XSLT. I'm trying to create a file that
Using XSLT, I'd like to be able to transform this : <doc> <tag1>AAA</tag1> Hello
I try to convert XML to XHTML using XSLT. The XML code provided contains
I'm a novice using XSLT. My requirement is best expressed through code. I'm looking
I am using XSLT 1.0 and have below sample code: In my XSLT, I
I am using XSLT to transform a XML into a html/php file. In this
I'm trying to create a xml using xslt. This is the xml that is

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.