INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

How do I add (County Court) text after a string value?

How do I add (County Court) text after a string value?

How do I add (County Court) text after a string value?

(OP)
I would like to add County Court after the string value for the court name. In my xsl I am using a variable vCourtORI to get the court name in the referring xml document. I need to add County Court after the Text on this line

CODE --> xml

<xsl:value-of select="$values[@type='CountyName']/Text"/> 

How do I do this. My xslt is displaying the Court Name but I want to add County Court after the name.

Desired output

CODE --> xml

<nc:OrganizationName>Ramsey County Court</nc:OrganizationName> 

Current output

CODE --> xml

<nc:OrganizationName>Ramsey</nc:OrganizationName> 

sample xml document

CODE --> xml

xmlns:CMCodeQueryHelper="urn:CMCodeQueryHelper" PackageID="DL Notice to DVS" MessageID="67084429" xmlns="">
    <Case InternalID="1616099249" ID="10475952" xmlns:user="http://tylertechnologies.com">
        <Court>
            <CourtName>Ramsey Criminal Suburban</CourtName>
            <CourtNCIC>MN062105J</CourtNCIC>
        </Court>
</Integration> 

Refering xm document for the Court name using CourtNCIC number

CODE --> xml

<EnumerationValue code="MN062105J">
    <Text>Ramsey Criminal Suburban</Text>
    <AssociatedValue type="CountyName">
      <Text>Ramsey</Text>
    </AssociatedValue>
</EnumerationValue> 

xsl code

CODE --> xslt

<xsl:template name="Court">
<Court>
<nc:StreetFullText>
    <xsl:variable name="vCourtORI">
        <xsl:value-of select="/Integration/Case/Court/CourtNCIC"/>
    </xsl:variable>
    <xsl:variable name="values" select="document(concat($gEnvPath,'\Schemas\CourtXML\SimpleTypes\CourtLocationTextType.xml'))/SimpleTypeCompanion/EnumerationValue[@code=$vCourtORI]/AssociatedValue"/>
        <xsl:value-of select="$values[@type='CountyName']/Text"/> 
</nc:StreetFullText>
</Court>
</xsl:template> 


RE: How do I add (County Court) text after a string value?

CODE --> XPath

<xsl:value-of select="concat($values[@type='CountyName']/Text,' County Court')"/> 

Typed, not tested.

XPath Functions Reference

Tom Morrison
Hill Country Software

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close