User Profile

Collapse

Profile Sidebar

Collapse
maxin
maxin
Last Activity: Mar 1 '09, 06:12 PM
Joined: Jan 18 '09
Location: Denmark
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • maxin
    replied to Convert DateTime to seconds
    in XML
    Hi,
    Thanks for your answer. However, I get the same error as before.
    Regards
    maxin
    See more | Go to post

    Leave a comment:


  • maxin
    started a topic Convert DateTime to seconds
    in XML

    Convert DateTime to seconds

    Hi,

    I have some date time in xml file:
    Code:
    <?xml version="1.0"?>
    <ProductionPerformance>
    	<ActualStartTime>2008-12-07T01:00:00</ActualStartTime>
    	<ActualEndTime>2008-12-09T01:00:00</ActualEndTime>
    </ProductionPerformance>
    where I need to convert ActualStratTime to seconds in xsl:
    Code:
    <?xml version="1.0"
    ...
    See more | Go to post

  • maxin
    replied to xsl: How to update varial value in a loop
    in XML
    Thanks all for the solution.
    I will try it.

    Regards maxin
    See more | Go to post

    Leave a comment:


  • maxin
    started a topic xsl: How to update varial value in a loop
    in XML

    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>
    ...
    See more | Go to post

  • maxin
    replied to How to import javascript in xsl
    in XML
    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
    Xin
    See more | Go to post

    Leave a comment:


  • maxin
    replied to How to import javascript in xsl
    in XML
    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");...
    See more | Go to post

    Leave a comment:


  • maxin
    replied to How to import javascript in xsl
    in XML
    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.
    See more | Go to post

    Leave a comment:


  • maxin
    replied to How to import javascript in xsl
    in XML
    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.
    See more | Go to post

    Leave a comment:


  • maxin
    replied to How to import javascript in xsl
    in XML
    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
    maxin
    See more | Go to post

    Leave a comment:


  • maxin
    replied to How to import javascript in xsl
    in XML
    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
    maxin
    See more | Go to post

    Leave a comment:


  • maxin
    replied to How to import javascript in xsl
    in XML
    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"...
    See more | Go to post

    Leave a comment:


  • maxin
    replied to How to import javascript in xsl
    in XML
    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="date
    ...
    See more | Go to post
    Last edited by Dormilich; Jan 18 '09, 02:12 PM. Reason: added [code] tags, please read your PMs

    Leave a comment:


  • maxin
    started a topic How to import javascript in xsl
    in XML

    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");
    ...
    See more | Go to post
    Last edited by Dormilich; Jan 18 '09, 01:05 PM. Reason: added [code] tags
No activity results to display
Show More
Working...