Subject: RE: [xsl] XSLT Simple Transformation? From: HSA <henrysa69@xxxxxxxxx> Date: Mon, 3 Nov 2003 14:38:44 -0800 (PST) |
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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl]   doesn't work for s, SANWAL, ABHISHEK (HP | Thread | [xsl] Displaying 10 Records at a ti, karthikeyan.balasubr |
Re: [xsl] String Replace, Wendell Piez | Date | Re: [xsl] Building Subsections in a, Mukul Gandhi |
Month |