Hi,
Thanks for your answer. However, I get the same error as before.
Regards
maxin
User Profile
Collapse
-
Convert DateTime to seconds
Hi,
I have some date time in xml file:
where I need to convert ActualStratTime to seconds in xsl:Code:<?xml version="1.0"?> <ProductionPerformance> <ActualStartTime>2008-12-07T01:00:00</ActualStartTime> <ActualEndTime>2008-12-09T01:00:00</ActualEndTime> </ProductionPerformance>
...Code:<?xml version="1.0"
-
-
xsl: How to update varial value in a loop
I have a xml file:
...Code:<E1MBXYI SEGMENT="1"> ... <CHARG>1000024187</CHARG> ... </E1MBXYI> <E1MBXYI SEGMENT="1"> ... <CHARG>1000024187</CHARG> ... </E1MBXYI> <E1MBXYI SEGMENT="1"> ... <CHARG>1000024188</CHARG> ... </E1MBXYI>
-
Hi Dormilich,
It is good to discuss my problem with you.
However, the list of UOM can very long, so it is not so good to use <choose>. I could not find not how to use string replace functions? What do you mean?
Regards
XinLeave a comment:
-
I just need a solution, no matter how to do it. Right now I made it as an array in javascript:
var ISOUOM= new Array("KGM","MT R","LTR","CT ");
var MESUOM= new Array("KG","M", "L","KAR");...Leave a comment:
-
MES will use LOIPRO01_2_B2MM L.xsl to transfer IDOC to B2MML, from one xml to another xml. I just nees a function to convert ISO code of UOM (Unit of measure KGM from SAP) to normal UOM (kg in MES) during the transform. However, I can not find a xpath function to do it. Therefor I made a by javascript.Leave a comment:
-
It is not a html I will make. This xsl is used to transfer IDOC to B2MML when I import an IDOC from SAP to MES.Leave a comment:
-
The problem seems in <![CDATA[ ... ]]> of the UOMConversion.x sl. It does not like "==" in if (UOMIn == ISOUOM[i]). However, if I change it to "=", it doesnot work correctly either. Is this a special kind of javascript in CDATA?
Regards
maxinLeave a comment:
-
Hi Dormilich,
Thanks so much for your answer. I changed my codes, But I stille get the same error. The interesting is if I make the javascript as .js and import it in html. No error occurs.
Regards
maxinLeave a comment:
-
xsl with javascript is imported successfully, however, ...
Hi,
Thanks for you answer.
It seems I need the namespace. I can import the xsl file successfully. However, I still get an error in the above javascript - "Microsoft JScript runtime error Wong number of arguments or invalid property..." I attached some codes.
Here is a xml which will be transformed:
[code=xml]
<?xml version="1.0"...Leave a comment:
-
I also used date function EXSLT. The date.msxsl.xsl has also some javascript as
...Code:<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" xmlns:msxsl="urn:schemas-microsoft-com:xslt" extension-element-prefixes="dateLeave a comment:
-
How to import javascript in xsl
Hi,
I write a javascript function in xsl (UOMConversion. xsl) as follow:
...Code:<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <script language="Javascript"> <![CDATA[ var ISOUOM= new Array("KGM","MTR","LTR","CT"); var MESUOM= new Array("KG","M","L","KAR");
No activity results to display
Show More
Leave a comment: