[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XSLT Simple Transformation?

Subject: RE: XSLT Simple Transformation?
From: HSA <henrysa69@xxxxxxxxx>
Date: Mon, 3 Nov 2003 14:38:44 -0800 (PST)
xslt simple
Thanks for the help. After I cleaned up the XSL and
fixed the typo with the string, the transformation
worked!

 
--- cknell@xxxxxxxxxx wrote:
> Your sample XSL file is not well formed. After
> straightening that out, I saw that you are trying to
> concat() something that is not a string, so that's
> probably where you are going wrong. Since you didn't
> say what you weren't getting that you were
> expecting, I'm guessing here. If you enclose 01 in
> single quotes inside your concat() function,
> ex. concat($temp, '01')
> you will probably get what you're after.
> -- 
> Charles Knell
> cknell@xxxxxxxxxx - email
> 
> 
> 
> -----Original Message-----
> From:     HSA <henrysa69@xxxxxxxxx>
> Sent:     Tue, 28 Oct 2003 13:54:43 -0800 (PST)
> To:       XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:   XSLT Simple Transformation?
> 
> Hello..I currently work with PeopleSoft 8.4 and I am
> working with application messaging between our HR
> database and our Financials database. I have the
> FUND_CF_SYNC message working between the two
> databases
> however, I have discovered that the message to be
> transformed. In Financials we have a SETID defined
> as
> 'XXX'. In HR, the SETID needs to publish as 'XXX01'.
> So what I need is a simple XSLT transformation
> program
> that concats the "01" to the end of 'XXX'. I am new
> to
> the XSLT language and I havent had any prior
> training
> with XML or XSLT. My XML message is as follows: 
> 
> Does anyone have any insight on what my XSLT code
> should look like? I have attempted to write some
> XSLT
> but I dont know if I am on the right track. I have
> included this example below the XML:
> 
> 
> Thanks in advance,
> 
> Henry
> 
> <?xml version="1.0"?>
> <FUND_CF_SYNC>
>   <FieldTypes>
>     <FUND_TBL class="R">
>       <SETID type="CHAR"/>
>       <FUND_CODE type="CHAR"/>
>       <EFFDT type="DATE"/>
>       <EFF_STATUS type="CHAR"/>
>       <DESCR type="CHAR"/>
>       <DESCRSHORT type="CHAR"/>
>     </FUND_TBL>
>     <PSCAMA class="R">
>       <LANGUAGE_CD type="CHAR"/>
>       <AUDIT_ACTN type="CHAR"/>
>       <BASE_LANGUAGE_CD type="CHAR"/>
>       <MSG_SEQ_FLG type="CHAR"/>
>       <PROCESS_INSTANCE type="NUMBER"/>
>       <PUBLISH_RULE_ID type="CHAR"/>
>       <MSGNODENAME type="CHAR"/>
>     </PSCAMA>
>   </FieldTypes>
>   <MsgData>
>     <Transaction>
>       <FUND_TBL class="R">
>         <SETID>XXX</SETID>
>         <FUND_CODE>96666</FUND_CODE>
>         <EFFDT>2003-10-28</EFFDT>
>         <EFF_STATUS>A</EFF_STATUS>
>         <DESCR>TEST</DESCR>
>         <DESCRSHORT>TEST</DESCRSHORT>
>       </FUND_TBL>
>       <PSCAMA class="R">
>         <LANGUAGE_CD>ENG</LANGUAGE_CD>
>         <AUDIT_ACTN>A</AUDIT_ACTN>
>         <BASE_LANGUAGE_CD>ENG</BASE_LANGUAGE_CD>
>         <MSG_SEQ_FLG/>
>         <PROCESS_INSTANCE>0</PROCESS_INSTANCE>
>         <PUBLISH_RULE_ID/>
>         <MSGNODENAME/>
>       </PSCAMA>
>     </Transaction>
>   </MsgData>
> </FUND_CF_SYNC>
> 
> 
> XSLT:
> 
> <!-- This program will transform XXX Setid to XXX01
> -->
> <?xml version="1.0"?>
> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>   <xsl:template match="FUND_CF_SYNC">
>       <FUND_CF_SYNC>
>           <xsl:apply-templates/>
>        </FUND_CF_SYNC>
> </xsl:template>
> <xsl:template match="node() | @*"/>
>    <xsl:copy>
>       <xsl:apply-templates select="node() | @*"/>
>    </xsl:copy>
>  </xsl:template>
> <xsl:template match="FUND_TBL">
>       <FUND_TBL><xsl:attribute
> name="class"><xsl:value-of
>  select="@class"/></xsl:attribute>
>          <xsl:variable name="temp" select="SETID"/>
>          <SETID><xsl:value-of
> select="concat($temp,01)"/></SETID>
>          <FUND_CODE>/>
>          <EFFDT>/>
>          <EFF_STATUS>/>
>          <DESCR/>
>          <DESCRSHORT/>
>       </FUND_TBL>
> <PSCAMA class="R">
>       <LANGUAGE_CD type="CHAR"/>
>       <AUDIT_ACTN type="CHAR"/>
>       <BASE_LANGUAGE_CD type="CHAR"/>
>       <MSG_SEQ_FLG type="CHAR"/>
>       <PROCESS_INSTANCE type="NUMBER"/>
>       <PUBLISH_RULE_ID type="CHAR"/>
>       <MSGNODENAME type="CHAR"/>
>     </PSCAMA>
>   </FieldTypes>
>    </xsl:template>
> </xsl:stylesheet>
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 
> 
> 
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.