xsl:message terminate="yes"/
Guys,
Testing out some functionality I think Im going to need.
<xsl:message terminate="yes"/>
Shouldnt this terminate the parser, as per the spec - it doesnt
seem to...
Also,
<xsl:message> Testing </xsl:message>
Produces:
Message: Testing
On the error stream, could we get them back in a more structured
way, perhaps as a callback, with some context information, so we
could use them?
Many thanks,
Andrew.
null
Can you describe better what
context you are thinking of
that would be useful?
I can think of several interpretations
of what context could mean here.
Thanks.
Steve Muench
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null
Similar Messages
-
hi friends,
I am trying to raise error from xslt mapping. I used <xsl:message terminate="yes">my error message</xsl:message>
I have set TRACE_LEVEL to 3 & LOGGING to 1 in integration engine configuration still I do not see my error message under 'trace' section of 'Request Message Mapping' step in XI. The processing of subsequent steps continues with empty message which I do not want.
I followed sap help on following link,
http://help.sap.com/saphelp_nw04/helpdata/en/8a/7672f7d7e444439fd7024f806221a4/content.htm
Any suggestions?
Thanks for your time in advance.
sachin kotalwarSachin,
<i>The processing of subsequent steps continues with empty message which I do not want.
</i>
Since you have given <xsl:message terminate="yes"> This attribute determines processing of the XSLT program should be terminated. But you dont want your program to be terminated. So change it to "no" and then it should work.
I hope that you have saved the data after you made changes to trace_level and logging.
Regards,
---Satish -
Xsl:message issue in xsl transformation while throwing an error.
Hi,
Below is error handling logic which im using to handle the DVM value not found error if the user input value is not found in dvm. This termiates the xslt processing and throws subLanguageExecutionFault. The issue is im unable to get the customized message which i have coded in <xsl:message> GGGGGGGG.dvm no value found!!! </xsl:message>.
The audit trail shows XML-22060: (Fatal Error) TERMINATE PROCESSING. with no other customized message given in the xsl:message tag.
<xsl:when test='dvm:lookupValue("oramds:/apps/AIAMetaData/dvm/GGGGGG.dvm",$DVMSourceCol,/seblabo:SiebelMessage/seblabo:XXXXtoYYYY/seblabo:YYYYY/seblabo:TypeCalc,$DVMTargetCol,"DVMValueNotFound") = "DVMValueNotFound" ' >
<xsl:message terminate="yes">
GGGGGGGG.dvm no value found!!!
</xsl:message>
</xsl:when>
Let me know how to populate the customized in xsl:message tag to audit trail or in the fault message.
Thanks in advance,
-RahulHi Rahul,
I faced the similiar issue. Still I am struggling with that. BTW did u check the soa logs to see if those reflect there? Did you find any workaround/solution?
Regards,
Susmit
Edited by: Susmit_Dey on 8 Aug, 2011 9:29 PM -
Transform XML and display xsl:message
Hi,
I have a simple method to transform XML. My XSLT has <xsl:message> to help debugging while transforming. How do I access the messages to System.out.printLn?
public static Document transformXML(Document xmlDoc, Document xslDoc) throws XMLHelperException {
try {
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new DOMSource(xslDoc));
DOMResult result = new DOMResult();
transformer.transform(new DOMSource(xmlDoc), result);
org.w3c.dom.Node resultNode = result.getNode();
if (resultNode instanceof Document) return (Document)resultNode;
else return result.getNode().getOwnerDocument();
} catch (TransformerConfigurationException ex) {
throw new XMLHelperException("Unable to perform transform " + ex.getLocationAsString(), ex);
} catch (TransformerException ex) {
throw new XMLHelperException("Unable to perform transform " + ex.getLocationAsString(), ex);
}thanks for the help.
Edited by: bonekrusher on Mar 8, 2008 2:27 PM
Edited by: bonekrusher on Mar 8, 2008 2:27 PMpublic class XForm {
public static void main(String[] args) throws Exception {
InputStream xslStream = null;
InputStream xmlStream = null;
try {
TransformerFactory tf = TransformerFactory.newInstance();
xslStream = new BufferedInputStream(new FileInputStream(args[1]));
Transformer t = tf.newTransformer(new StreamSource(xslStream));
tf.setErrorListener(new ErrorListener() {
public void error(TransformerException ex) throws TransformerException {
ex.printStackTrace();
public void fatalError(TransformerException ex) throws TransformerException {
ex.printStackTrace();
public void warning(TransformerException ex) throws TransformerException {
ex.printStackTrace();
xmlStream = new BufferedInputStream(new FileInputStream(args[0]));
t.transform(new StreamSource(xmlStream), new StreamResult(System.out));
} catch (Exception e) {
e.printStackTrace();
} finally {
if (xslStream != null)
xslStream.close();
if (xmlStream != null)
xmlStream.close();
<test>
<sample try="yes">
a
</sample>
</test>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan">
<xsl:template match="/">
<xsl:message terminate="no">got here</xsl:message>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="*|@*">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:transform> -
Use alert box in javascript using xsl:message in Xalan
There appears to be a xsl:message tag in XSLT. According to W3C, the implementation is dependent on the XSLT transformer.
However, this tag output the message to my console.
I would on the other hand like to output the message
in a javascript alert box. I am using jaxp 1.1, the XSLT
transformer is Xalan.
Thanks in advance,
taybwAs you surely know, Xalan is running on the server. That's why the <xsl:message> appears there. As far as I know, the only options available to XSLT implementors are whether the message will appear or not, or possibly whether it will end the translation abnormally.
Presumably you have Xalan producing HTML that will be rendered on the browser. If that's the case, then just replace the <xsl:message> element by some Javascript code that will pop up the alert box as soon as the browser loads the page you are writing. -
Xsl:message producing extra tags in output from stylesheets
If a tag is produced but not ended and xsl:call-template or xsl:apply-templates calls a template that has a xsl:message tag the (not ended) tag is produced again (but not ended) and the output will have 2 start tags but only one end tag.
It works correctly if an end tag, xsl:comment or text is produced before the xsl:message. It makes no difference if there is any other element, not producing output, between the start tag and the xsl:message. It also works if a start tag is produced before the xsl:message in the same template.
I have tested this with xmlparserv2 version 9.2.0.4.0, 9.2.0.5.0 and .xdk_version_10.1.0.0.0A_beta and they are all producing the same error.
Here is a simple stylesheet producing the error:
<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="messageTest">
<xsl:text>test</xsl:text>
<in>
<xsl:call-template name="message"/>
</in>
</xsl:template>
<xsl:template name="message">
<xsl:message>in here</xsl:message>
<html>
</html>
</xsl:template>
</xsl:stylesheet>
And here is simple xml transformed by the stylesheet:
<?xml version="1.0" encoding="UTF-8"?>
<messageTest><test>TEST</test>
</messageTest>
And here is the transformed output using oraxsl:
bash# /usr/java/jdk1.3.1_07/bin/java -classpath xmlparserv2.jar oracle.xml.parser.v2.oraxsl test.xml pages.xsl
<?xml version = '1.0'?>
file:/home/pontus/vodafone/pages.xsl:
Message: in here
file:/home/pontus/vodafone/pages.xsl:
Message: in here
test<in><in><in><html/></in>
If think this is a bug, but if it isn't please help me find the error in the stylesheet.
/Pontushtml-output
<html>
<body>
<img src="1.jpg"/>
<img src="2.jpg"/>
</body>
</html>
Please help me! -
Get Windows message "Terminate 5-1" after printing pdf reports with Orarrp
Hi,
I get error message "Terminate 5-1" on clients machine after pdf report is printed with Orarrp.
The clients is Windows XP with acrobat reader 5.
I test on acrobat reader 6 and get the same result.
This occur for all pdf reports and all clients.
However this message just shows when perform printing, if I cancel printing from print dialog box then this message does not show.
How can I avoid this message?
Thanks in advance
Tawatchai R.
===================
Hi,
I have same error message(Message Title: TerminateProcess Value; Message Body: 5-1) showing up when using Orarrp to print directly to printer on WEB using Oracle Forms. On my pc it shows when I have adobe acrobat reader opened up already and on others it may shows even if adobe acrobat is not already opened. However document gets printed but this is very annoying for the user to see this message.
Client Environments:
1. Windows XP, HP LaserJet 5P and HP LaserJet 4100 Series PCL, Adobe Acrobat 6.0
2. Windows 2000 Professional, HP LaserJet 4000 Series PCL, Adobe Acrobat 5.0 and 6.0
Thanks
Kulwinder SidhuHi Kulwinder,
We are getting this problem whenever we go through the following steps:
- Generate a PDF report without an ORARRP file extension on a dedicated reports server. Preview the report by opening in Adobe Reader using WEB.SHOW_DOCUMENT.
- Generate a PDF report with a ORARRP file extension of rrpa on a dedicated reports server. Directly print the report without a print dialog box using WEB.SHOW_DOCUMENT to invoke ORARRP.
After printing the Terminate Process 5-1 message appears and Adobe is left running. If the first step is missed out then printing occurs without error and Adobe closes automatically.
Please could you give more information on how you solved the problem. I am using Windows XP and Adobe 7.
Thanks,
Pete -
Can you filter messages by yes / no on attachments
I am trying to build filters and I can filter by most anything except whether or not the message contains an attachment. I was hoping I could send emails that have pictures attached to a separate folder. I could probably do it by size, but by attachment would be easier.. if allowed.
You need to use the spry:test attribute in conjunction with
the spry:repeat attribute:
<div class="MasterColumn" spry:repeat="ds1"
spry:test="'{Section}' == 'Current'" spry:setrow="ds1" >
--== Kin ==-- -
When the user presses the submit button, i want a popup with yes no to come up asking 'are you sure you want to submit'. I have found a javascipt example and is easy to implement but i'm not sure of the url to use. if they answer no then fine, do nothing. if they answer yes i need to continue on with the processing. do i need to use a url (i cant even imagine what would need to go in it) or is there some other command i can do? maybe somehow issue a submit or sql update database action? or is there a better way?
Hello,
Apex is using a built in variable called REQUEST. Each application button sets the value of REQUEST to the name of the button or to the request value attribute associated with the button.
Apex also using a pre-defined JavaScript function called doSubmit(REQUEST).
As you are talking about confirming a 'SUBMIT' action, all you need to do, in case of positive answer from the user, is to submit the page, using doSubmit('SUBMIT');
The page will be submitted to the server, and all the validations, computations and processes on the page will be evaluated, as if you didn't use the confirmation popup.
Regards,
Arie. -
System Message with Yes or No Button
Hi Techies,
I need value or which button pressed(Yes/No) for some validation.
If i presses the Yes button only my coding should work.
how can we get this.
Thanks and Regards,
YadavHi,
Try this as follows:
int ithReturnValue;
ithReturnValue = SBO_Application.MessageBox("Do you want to continue ?", 1, "Continue", "Cancel", "");
if (ithReturnValue == 1)
BubbleEvent = true;
else
BubbleEvent = false;
Hope it helps.
Thanks & Regards
Ankit Chauhan -
Internet Explorer does not balk on those same sites. Most sites do not cause the disconnect but on those that do I must revert to IE to complete the visit.
Please reinstall Firefox as follows:<br><br>
#Go to [http://www.mozilla.com/en-US/firefox/fx/?ref=logo Download Firefox 4.0.1] and download a fresh installation file ''to the desktop'' using IE8.<br><br>
#Then go to Add/Remove Programs, scroll down to "Mozilla Firefox" and remove it, choosing to keep your bookmarks, customizations etc., (''don't checkmark the box'').<br><br>
#Next, reboot and delete the folder called "Mozilla Firefox" at this location: C:\Program Files\Mozilla Firefox<br><br>
#Finally run the installation file you downloaded to the desktop earlier.<br><br>
Your bookmarks, customizations etc., are maintained in a different location and will become available to you again once you complete the installation.<br><br> -
Abap XSLT Exception block messages in SMQ2
Hello Community,
I have a XSLT ABAP transformation calling some ABAP objects and it's working well. I just need to handle some applications exceptions.
I wrote an ABAP Class that raise an exception in this way:
RAISE EXCEPTION TYPE cx_mapping_fault
EXPORTING
error_text = l_error.
The problem is that the message appears canceled in SMQ2 and I need to show the error status in the Integration Engine
I have tried with the <xsl:message>:
<xsl:message terminate="yes">Error</xsl:message>
But it didn't work. Exception isn't thrown in the Integration Engine. The message status is processed successfully.
Your help would be appreciated.
Regards,
Yuván>Hello VJ,
Thanks for your answer. I'm not using BPM in this scenario. I don't understand why messages that throw some exception in XSLT ABAP lock SMQ2. Because this doesn't happen when I use an ABAP-CLASS or message mapping as mapping programs. The lock is just using XSLT ABAP.
Is this normal...?....is there anyway to avoid the lock and change the status to error in the integration engine..?
Regards.
Yuvan, -
How do I halt an xsl transform on detection of a logical error?
I am using a transform in BPEL to process incoming data.
I would like to halt a transform on an error? I tried the following and it seems to work; however, jdev produces an error trying to parse after switching to the design mode.
<xsl:if test='not($expectedValue = $actualValue)'>
<xsl:message terminate="yes"></xsl:message>
</xsl:if>
Line Number:(xxx) : Error: "xsl:message" XSL Element Currently not Supported
I tried to use error() as well but that produces an error "Failed to transform source xml." "XSL_MAP_EXEC_ERROR" null.
If you have a reference to a best practice that would be appreciated.
Thanks,
JohnOkay, I've....
1) Reinstalled XE, to start from scratch
2) Went in to SQL*Plus, did a "create pfile from spfile;"
3) Shutdown the database
4) Started it up in MOUNT mode
5) Ran NID, to change the database name from 'XE' to 'CTXMGMT'
6) Shutdown the database again
7) Edited the pfile to change the database name (i.e. "db_name='CTXMGMT'")
8) Started up the database
And that worked! So that's good... but now my question is:
How do I change the SID for the database? Currently, the instance name for the database is still 'XE'....
SQL> select instance_name
2 from v$instance;
INSTANCE_NAME
xe
I'd like it so a connection could be made to the database with the tnsnames.ora file looking like this:
CTXMGMT =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(Host = rodin)(Port = 1521))
(CONNECT_DATA = (SID = CTXMGMT))
Could someone explain how to get the database to this state? Thanks.
- Gary -
XSL to validate xml structure using XSD
Hi,
Can you please provide me a sample xsl that validates input XML against the given schema?
I have been trying with the following, but I am getting an error in jdeveloper 11g.
XML-23003: (Error) XPath 2.0 feature schema-element/schema-attribute not supported
Process exited with exit code 1.
<?xml version="1.0" encoding="windows-1252" ?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import-schema schema-location="po1.xsd"/>
<xsl:output method="xml" version="1.0" indent="yes"/>
<!-- Root template -->
<xsl:template match="/">
<xsl:if test="not(* instance of schema-element(authorising))">
<xsl:message terminate="yes">
Source document is not a validated Provisioning list
</xsl:message>
</xsl:if>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
Thanks
923344Hi,
Can you please provide me a sample xsl that validates input XML against the given schema?
I have been trying with the following, but I am getting an error in jdeveloper 11g.
XML-23003: (Error) XPath 2.0 feature schema-element/schema-attribute not supported
Process exited with exit code 1.
<?xml version="1.0" encoding="windows-1252" ?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import-schema schema-location="po1.xsd"/>
<xsl:output method="xml" version="1.0" indent="yes"/>
<!-- Root template -->
<xsl:template match="/">
<xsl:if test="not(* instance of schema-element(authorising))">
<xsl:message terminate="yes">
Source document is not a validated Provisioning list
</xsl:message>
</xsl:if>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
Thanks
923344 -
XML-23002: (Error) internal xpath error while calling template
Hi,
I have used call-template named Chemloop in my xslt in the following way as attached in the xsl file. But when I am testing this xsl file through the bpel transformation, getting the error XML-23002: (Error) internal xpath error. Using this xslt I am converting a flat file into a xml file. My xslt except the call template part is working fine. Please suggest me if I m doing anything wrong.
XSLT:
<?xml version="1.0" encoding="UTF-8" ?>
<?oracle-xsl-mapper <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
<mapSources>
<source type="WSDL">
<schema location="../ReadASNNAEbizAlcanFileAdapter.wsdl"/>
<rootElement name="SynchAdvancedShipmentNotice" namespace="http://oracle.com/EbizGateway/NA/SynchASN/V2"/>
</source>
</mapSources>
<mapTargets>
<target type="WSDL">
<schema location="../ReadASNNAEbizAlcanFileAdapter.wsdl"/>
<rootElement name="ShipNotice" namespace=""/>
</target>
</mapTargets>
<!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.6.0(build 111214.0600.1553) AT [TUE FEB 12 21:05:56 GMT+05:30 2013]. -->
?>
<xsl:stylesheet version="2.0"
xmlns:svcdoc="http://xmlns.oracle.com/Services/Documentation/V1"
xmlns:aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.xpath.AIAFunctions"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:pc="http://xmlns.oracle.com/pcbpel/"
xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
xmlns:alcebo="http://oracle.com/EbizGateway/NA/SynchASN/V2"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
xmlns:med="http://schemas.oracle.com/mediator/xpath"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:alcabcs="http://xmlns.oracle.com/pcbpel/adapter/file/T2FJAN/CreateASNNAEBIZAlcanProvABCSImpl/ReadASNNAEbizAlcanFileAdapter"
xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
exclude-result-prefixes="xsi xsl pc alcebo plnk wsdl jca xsd alcabcs aia bpws xp20 bpel bpm ora socket mhdr oraext dvm hwf med ids xdk xref ldap">
<xsl:template match="/">
<ShipNotice>
<Header>
<BOLNo>
<xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D1DP1_1000/alcebo:BILL_OF_LADING_1000"/>
</BOLNo>
<TripNo>
<xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D1DP1_1000/alcebo:TRIP_NAME_1000"/>
</TripNo>
<Action>
<xsl:text disable-output-escaping="no"></xsl:text>
</Action>
<Attr1>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr1>
<Attr2>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr2>
<Attr3>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr3>
<Attr4>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr4>
<Attr5>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr5>
</Header>
<Shipment>
<ShipDate>
<xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D1DP1_1000/alcebo:DEPARTURE_DATE_1000"/>
</ShipDate>
<RouteCode>
<xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT4_1010"/>
</RouteCode>
<xsl:choose>
<xsl:when test='/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT1_1010 = "R"'>
<RateRouteCode>
<xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT3_1010"/>
</RateRouteCode>
</xsl:when>
<xsl:otherwise>
<RateRouteCode>
<xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT1_1010"/>
</RateRouteCode>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test='/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT1_1010 = "R"'>
<CarrierCode>
<xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT3_1010"/>
</CarrierCode>
</xsl:when>
<xsl:otherwise>
<CarrierCode>
<xsl:value-of select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT1_1010"/>
</CarrierCode>
</xsl:otherwise>
</xsl:choose>
<TransportModeCode>
<xsl:value-of select="substring(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT2_1010,1.0,1.0)"/>
</TransportModeCode>
<TransportModeType>
<xsl:value-of select="normalize-space(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:RTIN1_1030/alcebo:ROUTING_INSTRUCTIONS1_1030)"/>
</TransportModeType>
<xsl:choose>
<xsl:when test='normalize-space(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:SHIP_METHOD_CODE_EXT1_1010) = "R"'>
<TrailerNo>
<xsl:value-of select="concat(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:A1DL1_3600[1]/alcebo:DELIVERY_ATTRIBUTE1_3600,/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:A2DL2_3610[1]/alcebo:DELIVERY_ATTRIBUTE5_3610)"/>
</TrailerNo>
</xsl:when>
<xsl:otherwise>
<TrailerNo>
<xsl:value-of select="normalize-space(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:EQUIPMENT_NUMBER_1010)"/>
</TrailerNo>
</xsl:otherwise>
</xsl:choose>
<SealNo>
<xsl:value-of select="normalize-space(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D2DP2_1010[1]/alcebo:EQUIPMENT_SEAL_1010)"/>
</SealNo>
<Quantity>
<xsl:value-of select='sum(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:UnpackedOrder/alcebo:UnpackedItemDetail/alcebo:I3IT3_4520/alcebo:SHIPPED_QUANTITY_4520) + sum(format-number(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:UnpackedOrder/alcebo:P1PO1_4000/alcebo:FREIGHT_TERMS_CODE_EXT3_4000,"##############0.00"))'/>
</Quantity>
<QuantityUOM>
<xsl:value-of select="normalize-space(/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:D3DP3_1015[1]/alcebo:DELIVERY_TARE_WEIGHT_UOM_EXT1_1015)"/>
</QuantityUOM>
<Attr1>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr1>
<Attr2>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr2>
<Attr3>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr3>
<Attr4>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr4>
<Attr5>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr5>
<ShipmentItems>
<xsl:for-each select="/alcebo:SynchAdvancedShipmentNotice/alcebo:AdvanceShipmentNotice/alcebo:ASNShipmentLevel/alcebo:UnpackedOrder">
<ShipmentItem>
<ShipListNo>
<xsl:value-of select='concat(substring("0000",1.0,4.0 - string-length(string(position()))),string(position()))'/>
</ShipListNo>
<OrderNo>
<xsl:value-of select="normalize-space(alcebo:P1PO1_4000/alcebo:PURCHASE_ORDER_NUMBER_4000)"/>
</OrderNo>
<LineNo>
<xsl:value-of select="normalize-space(alcebo:UnpackedItemDetail/alcebo:I2IT2_4510[1]/alcebo:CUST_PO_LINE_NUM_4510)"/>
</LineNo>
<ItemNoXref>
<xsl:value-of select="normalize-space(alcebo:UnpackedItemDetail/alcebo:I1IT1_4500[1]/alcebo:BUYER_PART_NO_4500)"/>
</ItemNoXref>
<AlcoaPartNo>
<xsl:value-of select="normalize-space(alcebo:UnpackedItemDetail/alcebo:I1IT1_4500[1]/alcebo:SUPPLIER_PART_NUMBER_4500)"/>
</AlcoaPartNo>
<Quantity>
<xsl:value-of select="sum(alcebo:UnpackedItemDetail/alcebo:I3IT3_4520/alcebo:SHIPPED_QUANTITY_4520)"/>
</Quantity>
<QuantityUOM>
<xsl:value-of select="normalize-space(alcebo:UnpackedItemDetail/alcebo:I3IT3_4520[1]/alcebo:ORDER_QUANTITY_UOM_INT_4520)"/>
</QuantityUOM>
<TareWeight>
<xsl:value-of select='format-number(alcebo:P1PO1_4000/alcebo:FREIGHT_TERMS_CODE_EXT3_4000,"##############0.##")'/>
</TareWeight>
<TareWeightUOM>
<xsl:value-of select="normalize-space(alcebo:UnpackedItemDetail/alcebo:I3IT3_4520[1]/alcebo:ORDER_QUANTITY_UOM_INT_4520)"/>
</TareWeightUOM>
<Attr1>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr1>
<Attr2>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr2>
<Attr3>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr3>
<Attr4>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr4>
<Attr5>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr5>
<xsl:for-each select="alcebo:UnpackedItemDetail">
<Bundle>
<LotNo>
<xsl:value-of select="alcebo:DeliveryDetail/alcebo:LSDET_5500[1]/alcebo:LOT_NUMBER_5500"/>
</LotNo>
<SubLotNo>
<xsl:value-of select="alcebo:DeliveryDetail/alcebo:EX02_5591[1]/alcebo:DSNO_LEV06_EXT09_5591"/>
</SubLotNo>
<Quantity>
<xsl:value-of select="alcebo:I3IT3_4520[1]/alcebo:SHIPPED_QUANTITY_4520"/>
</Quantity>
<QuantityUOM>
<xsl:value-of select="alcebo:I3IT3_4520[1]/alcebo:ORDER_QUANTITY_UOM_INT_4520"/>
</QuantityUOM>
<Pieces>
<xsl:value-of select="alcebo:DeliveryDetail/alcebo:EX02_5591[1]/alcebo:DSNO_LEV06_EXT10_5591"/>
</Pieces>
<Attr1>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr1>
<Attr2>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr2>
<Attr3>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr3>
<Attr4>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr4>
<Attr5>
<xsl:text disable-output-escaping="no"></xsl:text>
</Attr5>
<!-- User Defined Templates -->
<xsl:call-template name="Chemloop">
<xsl:with-param name="i">1</xsl:with-param>
</xsl:call-template>
</Bundle>
</xsl:for-each>
</ShipmentItem>
</xsl:for-each>
</ShipmentItems>
</Shipment>
</ShipNotice>
</xsl:template>
<xsl:template name="Chemloop">
<xsl:param name="i"/>
<xsl:variable name="ChemRow"
select="concat(/alcebo:DeliveryDetail[position()]/alcebo:EX01_5590[1]/alcebo:DSNO_LEV06_EXT01_5590,/alcebo:DeliveryDetail[position()]/alcebo:EX01_5590[1]/alcebo:DSNO_LEV06_EXT02_5590,/alcebo:DeliveryDetail[position()]/alcebo:EX01_5590[1]/alcebo:DSNO_LEV06_EXT03_5590,/alcebo:DeliveryDetail[position()]/alcebo:EX01_5590[1]/alcebo:DSNO_LEV06_EXT04_5590)"/>
<xsl:variable name="ChemBlock"
select="substring($ChemRow,1+($i-1)*33,33)"/>
<xsl:if test="$ChemBlock!=' '">
<ChemicalAnalysis>
<ElementName>
<xsl:value-of select="substring($ChemBlock,1,5)"/>
</ElementName>
<RNDValue>
<xsl:value-of select="substring($ChemBlock,6,15)"/>
</RNDValue>
<ValueQualifier>
<xsl:value-of select="substring($ChemBlock,21,2)"/>
</ValueQualifier>
<NumDecimals>
<xsl:value-of select="substring($ChemBlock,23,3)"/>
</NumDecimals>
<DropNo>
<xsl:value-of select="substring($ChemBlock,26,8)"/>
</DropNo>
</ChemicalAnalysis>
</xsl:if>
<xsl:if test="($ChemBlock=' ') and $i=1">
<xsl:message terminate="yes">No Chemical data found</xsl:message>
</xsl:if>
<xsl:if test="$i <= 26">
<xsl:call-template name="Chemloop">
<xsl:with-param name="i">
<!-- Increment index-->
<xsl:value-of select="$i + 1"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>I can't get what are you trying to achieve by a construction like bellow...
/alcebo:DeliveryDetail[position()]
Remember XSLT is not a procedural language... a selector like /alcebo:DeliveryDetail[position() = $var] or just /alcebo:DeliveryDetail[$var] would make more sense...
Cheers,
Vlad
Maybe you are looking for
-
Is it possible to script language change in OSX Lion ?
I recently purchased a Disney game (Cars 2) from the App Store, which advertises being available in 5 languages. It seems now that the game has no in-app options to change language, but selects the language based on OSX settings (but otherwise the ap
-
How to download adobe acrobat pro on a new computer
I want to install my adobe acrobat pro on a new computer - how can I do that?
-
Desktop gadgets are managed by system administrator
Dear Windows Team, Some time back I had turned off the gadgets from my desktop. Now when I am trying to show the gadgets again, while clicking on the gadgets, it comes out with a message "Desktop gadgets are managed by your system administrator". It
-
After install "4share" programme then I can't open Firefox 5
after install "4share" programme then I can't open Firefox 5 and ha
-
Seriennummer Adobe Photoshop Elements 12
Nach einer neuinstallation , Adobe Photoshop Elements 12, wurde meine Seriennummer nicht mehr angenommen. (gesperrt). Kann mir jemand helfen. Vielen Dank