Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 20th, 2011, 05:00 PM
Authorized User
 
Join Date: Apr 2010
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default Old XSLT broken in production

We use XSLT Map in SAP XI. We recently applied some patches in SAP XI.

The following XSLT map use to work earlier and now its broken. Not sure what have changed in sapxmltoolkit.jar from SAP. But i am here to request expert help to see if there is any problem with the following xslt and suggest if there are any changes with in XSLT 1.0 release in between. Or help me to rewrite this in some other simple way. So that i can test and see how this works.

The following code look for RFID_PALL first and copy RFID_CASE which will appear later. We are just trying to do sorting on this, as we are not sure how the source is going to come always.

There might be multiple RFID_PALL will occur sometimes.

Appreciate your help in advance

Code:
<xsl:choose>
							<xsl:when test="E1EDL37[VHILM='RFID_PALL']">
								<xsl:for-each select="E1EDL37[VHILM='RFID_PALL']">
									<xsl:copy-of select="."/>
									<xsl:for-each select="E1EDL44">
										<xsl:variable name="Case" select="EXIDV"/>
										<xsl:copy-of select="../../E1EDL37[EXIDV=$Case]"/>
									</xsl:for-each>
								</xsl:for-each>

								<xsl:for-each select="E1EDL37[VHILM='RFID_CASE']">
									<xsl:for-each select="E1EPC02">
										<xsl:if test="not(PARENT_NAME)">
											<!--<xsl:variable name="Case1" select="EXIDV"/>-->
											<xsl:copy-of select="../."/>
										</xsl:if>
									</xsl:for-each>
								</xsl:for-each>
							</xsl:when>
							<xsl:otherwise>

								<xsl:for-each select="E1EDL37[VHILM='RFID_CASE']">
									<xsl:copy-of select="."/>
								</xsl:for-each>
							</xsl:otherwise>
						</xsl:choose>
 
Old July 20th, 2011, 05:40 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Sorry, there's no way anyone can debug your code without knowing anything about how it runs or how it fails. There's nothing obviously wrong with the code fragment posted.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old July 21st, 2011, 04:16 PM
Authorized User
 
Join Date: Apr 2010
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can this be written in some other way. Just help me with new ideas with XSLT 2.0
The above code mentioned is in production and working for longtime. We have updated our system with latest patches. And suddenly this particular XSLT map is not working. Not sure what's wrong with this. There are some other XSLT maps those are fine.

Here is an example. In this case, i am trying to RFID_PALL record with in that there are child records as a reference to the next subset. I am trying to sort them RFID_PALL follows related RFID_CASE and then repeat the same


Sample Structure

<E1EDL37>
<EX1DV>0000000000101</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000102</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000103</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000104</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000201</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000202</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000203</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000204</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EXIDV>0000000000200</EXIDV>
<VHILM>RFID_PALL</VHILM>
<E1EDL44>
<EXIDV>0000000000201</EXIDV>
<EXIDV>0000000000202</EXIDV>
<EXIDV>0000000000203</EXIDV>
<EXIDV>0000000000204</EXIDV>
.......
</E1EDL37>
<E1EDL37>
<EXIDV>0000000000100</EXIDV>
<VHILM>RFID_PALL</VHILM>
<E1EDL44>
<EXIDV>0000000000101</EXIDV>
<EXIDV>0000000000102</EXIDV>
<EXIDV>0000000000103</EXIDV>
<EXIDV>0000000000104</EXIDV>
.......
</E1EDL37>
 
Old July 21st, 2011, 04:41 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Is this really your approach to problem solving? "I don't know what's wrong with my code so I'll try writing it some other way. Or rather, I'll ask someone else to try writing it some other way. Oh, and I won't bother telling them what output is required - they should be able to work from my existing code, even though it doesn't actually work."

You might as well set a group of monkeys loose with a typewriter or two.

You need to find out why your code isn't working. If you want help doing that, you need to provide enough information so that we can help you.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old July 21st, 2011, 04:51 PM
Authorized User
 
Join Date: Apr 2010
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am trying to solve the problem from the system aspect. Also trying with one of the graphical tools i have with in the software to solve the problem. As it is is working in development landscape and having troubles working in Q and Prod, i don't see the problem with the code.

Here is the output from the above sample structure


<E1EDL37>
<EXIDV>0000000000100</EXIDV>
<VHILM>RFID_PALL</VHILM>
<E1EDL44>
<EXIDV>0000000000101</EXIDV>
<EXIDV>0000000000102</EXIDV>
<EXIDV>0000000000103</EXIDV>
<EXIDV>0000000000104</EXIDV>
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000101</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000102</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000103</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000104</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>

<E1EDL37>
<EXIDV>0000000000200</EXIDV>
<VHILM>RFID_PALL</VHILM>
<E1EDL44>
<EXIDV>0000000000201</EXIDV>
<EXIDV>0000000000202</EXIDV>
<EXIDV>0000000000203</EXIDV>
<EXIDV>0000000000204</EXIDV>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000201</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000202</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000203</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>
<E1EDL37>
<EX1DV>0000000000204</EX1DV>
<VHILM>RFID_CASE</VHILM>
.......
</E1EDL37>



Thanks for looking into this.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Deploying to Production Site DragonLEG BOOK: Beginning ASP.NET 4 : in C# and VB 1 July 1st, 2011 04:22 PM
FindControl Problem Production Server GameGorilla BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 March 11th, 2009 03:39 PM
Controls Work In Dev but not Production qdd ASP.NET 2.0 Basics 1 September 6th, 2007 12:45 PM
~* Installing MSRS in Production Server *~ chakravarthy_vr Reporting Services 0 March 9th, 2006 09:31 PM
values not showing in production server. stewdabaker Classic ASP Databases 1 June 9th, 2004 03:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.