How to transform Xml to html which contains javascript

I know it is useful to use xsl to do simple transformation, but since I need to pass some values into the javascript's functions in html, just don't know how to do that. Any advice is apprciated!!

try
<xsl:element name="script">
<xsl:attribute name="language">javascript</xsl:attribute>
your regular javascript ... take care about the special characters
</xsl:element>
s_Scorpius@yahoo

Similar Messages

  • How to call a Oracle Proc,which contains Object Type as in Param, from java

    Hi
    Would like to know how to call a Oracle Procedure which contains the Object Type Parameter from java.
    Here is my code will look like...
    1. CREATE OR REPLACE TYPE emp AS OBJECT
    Empno NUMBER,
    Ename VARCHAR2(50)
    [COLOR=royalblue]In step1 I have created object type.[COLOR]
    2.CREATE OR REPLACE PACKAGE ref_pkg IS
    TYPE tab_emp IS TABLE OF emp;
    END ref_pkg;
    [COLOR=royalblue]In step2,I have created a table type which is of type emp;[COLOR]
    3. CREATE OR REPLACE PROCEDURE p_emp(p_emptab IN ref_pkg.tab_emp) as
    BEGIN
    FOR I IN 1..p_emptab.COUNT
    LOOP
    Some code written here
    END LOOP;
    END;
    [COLOR=royalblue]In step3 I have passed tabletype which is of type emp as argument.[COLOR]
    Now I need to invoke this procedure from JAVA.
    Calling a procedure doesn�t matter.
    But how I can map objecttype ? how will java recognize oracle object ?
    How can I implement this ?
    Any Help/Clues is Appreciated.
    Thanks
    Krishna

    Hi Bob
    You can call a stored proc from a database control with the jc:sql annotation itself.
    Assume a stored proc taking one In parameter
    * @jc:sql statement="call sp_updateData({id})"
    void call_sp_updateCust(int id);
    You can even call stored proc with OUT parameters using
    * @jc:sql statement="{call sp_MyProc(?, ?)}"
    void call_sp_MyProc(SQLParameter[] params)
    You can also call stored functions via db control.
    More info and diff ways to call at
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/database/conStoredProcedures.html
    Thanks
    Vimala

  • How to display xml to html using xsl?

    hi all...may i know how to display xml to html page?
    i ve included <xsl:output method="html" indent="yes" /> inside my xsl file. i clicked on output.xml file and everything is displayed correctly but the format is xml instead of html. is there anyway to transform it to html?
    below are my xsl and xml codes:
    // xsl file
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" indent="yes" />
    <xsl:template match="/">
    <html>
    <body>
    <h2>Document Contents</h2>
    <table border="1">
    <tr bgcolor="#9acd32">
         <th align="center">Document Name</th>     
         <th align="center">Document ID</th>          
         <th align="center">Owner</th>               
    </tr>
    <xsl:for-each select="Document/Contents">
    <tr>
    <td><xsl:value-of select="DocumentName"/></td>
    <td><xsl:value-of select="DocumentID"/></td>
    <td><xsl:value-of select="Originator"/></td>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    // xml file
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="xsltStyleSheet.xsl"?>
    <Document>
         <Contents>
              <DocumentName>register</DocumentName>
              <DocumentID>1</DocumentID>
              <Originator>hhh</Originator>
         </Contents>
    </Document>
    </xsl:template></xsl:stylesheet>

    your XSL transforms to HTML (in fact XHTML): what more do you expect? did you expected anything different from the following output? if yes: what and why?
    <html>
         <body>
              <h2>Document Contents</h2>
              <table border="1">
                   <tr bgcolor="#9acd32">
                        <th align="center">Document Name</th>
                        <th align="center">Document ID</th>
                        <th align="center">Owner</th>
                   </tr>
                   <tr>
                        <td>register</td>
                        <td>1</td>
                        <td>hhh</td>
                   </tr>
              </table>
         </body>
    </html>

  • I should have said in my previous message that the iphoto program I am using is for an ipad 2.  I simply want to know how to delete an edited album which contains one photo that I do not want taking up space.

    I should have said in my previous message that the iphoto program I am using is for an ipad 2.  I simply want to know how to delete an edited album which contains one photo that I do not want taking up space.

    OK....I'm stumped.  The message you are seeing is typically there to protect someone from syncing with a different computer/iTunes account.  Is there any way anyone else has used your iPad and possibly connected it to their computer?

  • How can I Sync a folder (which contains all types files, sub folders and weighs some gigs) through wifi or USB ( and not using cloud services) between my New Ipad and Win 7 PC? Any apps available? Kindly help

    How can I Sync a folder (which contains all types files, sub folders and weighs some gigs) through wifi or USB ( and not using cloud services) between my New Ipad and Win 7 PC? Any apps available?
    kindly suggest a solution.
    Thank you inadvance!

    You can only import photos/videos via USB and the camera connection kit.
    ITunes: Syncing media content to your iOS devices
    http://support.apple.com/kb/ht1351
     Cheers, Tom

  • Problems in transforming XML to HTML using HP-UX with Netscape Enterprise Server 4.0 sp3

    Hi,
    Has anyone ever had any problem using XML in NES 4.0 sp3?
    I'm using the libraries com.sun.xml.parser, com.sun.xml.tree, javax.xml.transform.
    The html is being created but is not being returned.
    (it is not showed in browser)
    This same xml application works well in Solaris with Iplanet Web Server 4.1, but it is not working in HP-UX with Netscape Enterprise Server 4.0 sp3.
    I'm entirely lost. I don't know if there is a bug in this version (NES 4.0) or if I need other xml libraries or it is a problem of JRE version.
    Any comments will be appreciate.
    Thanks

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Norbert Clavaux ([email protected]):
    Hi,
    Last year we built a complete new website, based on XML/XSL.
    We assumed all browsers would cope with XSL by now, but that was far to optimistic.
    Our company planned to launch the new site this december, but XSL is giving us some major problems:
    *** All our customers are obliged to use Internet Explorer 4/5.x. Some don't like that at all: they stick to Netscape.
    *** IE users have to download and install the MS-XSL parser. At our pilotsites this is giving a lot of trouble and frustration.
    I heard that it is possible to do the parsing at the serverside, using XSLT, creating HTML.
    HOW CAN WE INSTALL / IMPLEMENT THIS OPTION IN OUR CONFIGURATION?
    (PL/SQL / IAS 9i / Sun Solaris / Oracle 8.1.2)
    Thanks in advance,
    Norbert Clavaux
    Nederlandse Bibliotheek Dienst
    The Netherlands<HR></BLOCKQUOTE>
    You could use DB Prism / Cocoon CMS.
    This CMS is built on top of Apache Cocoon Framework and DB Prism servlet engine.
    This CMS stores the assets in the DB (CLOB) and applys the stylesheet at runtime.
    If you need more information about this CMS look at is free.
    This CMS builts the DB Prism web site at www.plenix.com/dbprism/
    Best regards, Marcelo.

  • How to load file thru reader which contains non-english char in file name

    Hi ,
    I want to know how to load file in english machine thru reader which contains non-english chars in file names (eg. 置顶.pdf)
    as LoadFile gives error while passing unicode converted file name.
    Regards,
    Arvind

    You don't mention what version of Reader?  And you are using the AcroPDF.dll, yes?
    Sent from my iPad

  • Help Please ! -- transform XML to HTML using xslt tag in JSP

    Hello,
    I have problem to do XSL transform in JSP.
    I have an XSL : test.xsl
    I have an XML : test.xml
    In JSP I have:
    <x:xslt media="html" xml="test.xml">
    <x:stylesheet media="html" uri="test.xsl" />
    </x:xslt>
    But It doesn't work the way it suppose to. What is wrong in my code ? I followed the URL http://e-docs.bea.com/wls/docs81/xml/xml_apps.html
    Thanks in advance,
    Christina

    Basically:
        try{
          //Setting up parameters.
          xml=new StreamSource(new File(xmlInput));
          xsl=new StreamSource(new File(xslInput));
          baos=new ByteArrayOutputStream();
          htmlResult=new StreamResult(baos);
          //Transform input(xml, xsl) onto html output.
          TransformerFactory tfactory=TransformerFactory.newInstance();
          Transformer transformer=tfactory.newTransformer(xsl);
          transformer.transform(xml, htmlResult);
          baos.writeTo(out);
          //System.err.println(htmlResult.getOutputStream().toString());
        catch(...){
        }I havent tested and I havent use this for a while, but I hope this can serve as a staring point.
    Regards,
    OO

  • How to transform XML to access table?

    is there a example programme?
    thx

    You can transform XML to any of XML or HTML or text.
    If you want to convert the output of that transformation to rows in a database table then you could write a Java program to do that. That's nothing to do with XML though. Look for JDBC examples.

  • JDBC: How  to select only those records which contains col1 is NULL

    Hi All,
    In JDBC SELECT scenario.
    I wants to select only those records which contains col1 is NULL.
    I am trying as follows:
    <key>
    <col1 isNull="TRUE" />
    </key>
    but in moni/monitoring i am getting Following Error
    006-12-01 19:35:20 Error Unable to execute statement for table or stored procedure. 'BG_SALARY_SEND_SAP_D' (Structure 'SELECT') due to java.sql.SQLException: FATAL ERROR document format: structure 'SELECT', key element 'key' contains no values
    2006-12-01 19:35:20 Error Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'BG_SALARY_SEND_SAP_D' (structure 'SELECT'): java.sql.SQLException: FATAL ERROR document format: structure 'SELECT', key element 'key' contains no values
    Please suggest how to do select rows with col1 is null.
    Regards

    Rohan,
    isNull= true is used to make the KEY element not mandatory.
    In your case, if the select query is
    select emp from emptest where empno is null
    , then the datatype will be,
    <root>
    <StatementName>
    <dbTableName action=”SELECT”>
      <table>emptest</table>
    <access>
    <emp></emp>
    </access>
    <key1>
    <b><empno hasQuot="NO">is null</empno></b>
    </key1>
    </dbTableName> 
    </StatementName>
    </root>
    I dont have a DB access to try this, but I think this should work.
    If this doesnt work, then you would need to use SQL_QUERY,
    <root>
    <StatementName>
    <anyName action=” SQL_QUERY”>
    <access>select emp from emptest where empno is null</access>
    </anyName > 
    </StatementName>
    </root>
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Regards,
    Bhavesh

  • How should I create JAR file which  contain JMF library and project classes

    Hi,
    I installed the JMF windows pack. I compiled and ran successfully myApplet (which use JMF librarie) in Internet Explorer on my machine. When I run this applet on some different machine, where JMF isn�t installed- it�s not running.
    There is an error:
    java.lang.NoClassDefFoundError: javax/media/ControllerListener
    I was trying to create jar file, which contain librarie JMF.jar and all other files which are require to run myApplet (*.jar, *.class, the files from folder �MyApplet�) and run it on the other computer. It still doesn�t work.
    Also I ran a JMF Customizer and created customize.jar but this file contains only JMF classes. I don�t know how add other files to it.
    How should I create a jar file which will contains all essential files to run myApplet on other machine (something like �All In One� J )
    I�m using Eclipse.
    Can somebody help me?.
    Thank You!
    Best regards:
    Peter

    Hi
    i want to make a jar file of application which is using JMF to play audio
    and video. it works well during compilation and execution but doesn't
    works in jar file.
    please help me how i make a jar file whic will run audio and video too
    your's truely
    abdul

  • How to convert XML or Html to Templates MS Word

    Now I have to do one job that convert XML or Html to MS Word (template).
    Does anyone have better ideas? Would you like share with me?
    Thanks.
    Joaquin Alem

    You can read both an XML and a well defined HTML document, using an XML parser. Although some HTML docs aren't well defined, ie. they don't strictly have matching begin & end tags, so an XML parser might reject them.
    Check out http://jakarta.apache.org/poi/ for Java interfaces to Ms Word functionality. It's basically a wrapper to the Ms Word COM objects.
    regards,
    Owen

  • How to use a transformer xml to html

    hi
    I want to develop jsp pages based on xml data, so to construct components with xml data i must use a transformer converting xml to htm. so if there is a better or more generic solution of classes or examples that can help me , i tried to use cocoon but the problem was to use it within a jsp page.
    please to mail me your suggestions or solutions .
    thank you

    Review Xalan/Xerces from the Apache project.
    http://xml.apache.org/xalan-j/index.html
    http://xml.apache.org/xalan-j/usagepatterns.html#servlet
    http://xml.apache.org/xalan-j/samples.html
    Just one method...

  • How to convert xml to html?

    Scenario -> There are two systems, one is SAP CRM and another is Non-SAP system. A log file is coming from non-sap system through proxy class and consumed into SAP CRM. This log file contains some xml format which is given below and the xml format need to be converted into html format.
    Example ->
    DataInstance types such as 'text', 'integer', 'datetime', 'date', 'time' and 'real' can be restricted to a "range" of available options for selection by a user. The value returned to the Web Service should always be a single value. If a list of range values is provided then the return value must be one of the listed range values.
    XML view:
    <DataInstance>
        <Name>time_of_day</Name>
        <Description>Is is morning or afternoon?</Description>
        <Type>text</Type>
        <Ranges>
          <Range>
            <Caption>morning</Caption>
            <Value>morning</Value>
          </Range>
          <Range>
            <Caption>afternoon</Caption>
            <Value>afternoon</Value>
          </Range>
        </Ranges>
        <Values>
          <Value>morning</Value>
        </Values>
      </DataInstance>
    HTML view:
    Time of day
    Is it morning or afternoon?
    (.)morning
    ()afternoon
    () -> It is a radio button.
    Can you please suggest me how to do this conversion?

    You can read both an XML and a well defined HTML document, using an XML parser. Although some HTML docs aren't well defined, ie. they don't strictly have matching begin & end tags, so an XML parser might reject them.
    Check out http://jakarta.apache.org/poi/ for Java interfaces to Ms Word functionality. It's basically a wrapper to the Ms Word COM objects.
    regards,
    Owen

  • How to unload externally loaded swf which contains 3D Carousel?

    Hello to all
    I am learning AS3 and have been taking on various tutorials found on the net. While learning about AS3 I came across a lesson on http://tutorials.flashmymind.com/2009/05/vertical-3d-carousel-with-actionscript-3-and-xml/ titled "Vertical 3D Carousel with AS3 and XML".
    I completed the tutorial and all worked fine so I then wanted to load the swf into a existing project. The loading of the swf goes fine and when I unload my loader it is removed but only visually as in my output panel in flash CS5 I get an error as follows
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at carousel_c_fla::MainTimeline/moveCarousel()
    this error repeats over and over again slowing my swf movie.
    So does this mean my main flash movie trying to still play / find my unloaded 3D Carousel?
    If so how do I unload remove all the AS3 that is trying to run from the 3D Carousel?
    I have included the AS3 below from the tutorial page and I understand that this is what I have to remove to "break free" from the 3D Carousel swf when it is unloaded. This is where I am stuck as my knowledge of AS3 is limited - Can you guys / girls help?
    //Import TweenMax
    import com.greensock.*;
    //The path to the XML file (use your own here)
    // old var from tutorial - var xmlPath:String = "http://tutorials.flashmymind.com/XML/carousel-menu.xml";
    var xmlPath:String = "carousel-menu.xml";
    //We'll store the loaded XML to this variable
    var xml:XML;
    //Create a loader and load the XML. Call the function "xmlLoaded" when done.
    var loader = new URLLoader();
    loader.load(new URLRequest(xmlPath));
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    //This function is called when the XML file is loaded
    function xmlLoaded(e:Event):void {
         //Make sure that we are not working with a null variable
         if ((e.target as URLLoader) != null ) {
              //Create a new XML object with the loaded XML data
              xml = new XML(loader.data);
              //Call the function that creates the menu
              createMenu();
    //We need to know how many items we have on the stage
    var numberOfItems:uint = 0;
    //This array will contain all the menu items
    var menuItems:Array = new Array();
    //Set the focal length
    var focalLength:Number = 350;
    //Set the vanishing point
    var vanishingPointX:Number = stage.stageWidth / 2;
    var vanishingPointY:Number = stage.stageHeight / 2;
    //We calculate the angleSpeed in the ENTER_FRAME listener
    var angleSpeed:Number = 0;
    //Radius of the circle
    var radius:Number = 128;
    //This function creates the menu
    function createMenu():void {
         //Get the number of menu items we will have
         numberOfItems = xml.items.item.length();
         //Calculate the angle difference between the menu items (in radians)
         var angleDifference:Number = Math.PI * (360 / numberOfItems) / 180;
         //We use a counter so we know how many menu items have been created
         var count:uint = 0;
         //Loop through all the <button></button> nodes in the XML
         for each (var item:XML in xml.items.item) {
              //Create a new menu item
              var menuItem:MenuItem = new MenuItem();
              //Calculate the starting angle for the menu item
              var startingAngle:Number = angleDifference * count;
              //Set a "currentAngle" attribute for the menu item
              menuItem.currentAngle = startingAngle;
              //Position the menu item
              menuItem.xpos3D = 0;
              menuItem.ypos3D = radius * Math.sin(startingAngle);
              menuItem.zpos3D = radius * Math.cos(startingAngle);
              //Calculate the scale ratio for the menu item (the further the item -> the smaller the scale ratio)
              var scaleRatio = focalLength/(focalLength + menuItem.zpos3D);
              //Scale the menu item according to the scale ratio
              menuItem.scaleX = menuItem.scaleY = scaleRatio;
              //Position the menu item to the stage (from 3D to 2D coordinates)
              menuItem.x = vanishingPointX + menuItem.xpos3D * scaleRatio;
              menuItem.y = vanishingPointY + menuItem.ypos3D * scaleRatio;
              //Add a text to the menu item
              menuItem.menuText.text = item.label;
              //Add a "linkTo" variable for the URL
              menuItem.linkTo = item.linkTo;
              //We don't want the text field to catch mouse events
              menuItem.mouseChildren = false;
              //Assign MOUSE_OVER, MOUSE_OUT and CLICK listeners for the menu item
              menuItem.addEventListener(MouseEvent.MOUSE_OVER, mouseOverItem);
              menuItem.addEventListener(MouseEvent.MOUSE_OUT, mouseOutItem);
              menuItem.addEventListener(MouseEvent.CLICK, itemClicked);
              //Add the menu item to the menu items array
              menuItems.push(menuItem);
              //Add the menu item to the stage
              addChild(menuItem);
              //Assign an initial alpha
              menuItem.alpha = 0.3;
              //Add some blur to the item
              TweenMax.to(menuItem,0, {blurFilter:{blurX:1, blurY:1}});
              //Update the count
              count++;
    //Add an ENTER_FRAME listener for the animation
    addEventListener(Event.ENTER_FRAME, moveCarousel);
    //This function is called in each frame
    function moveCarousel(e:Event):void {
         //Calculate the angle speed according to mouseY position
         angleSpeed = (mouseY - stage.stageHeight / 2) * 0.0002;
         //Loop through the menu items
         for (var i:uint = 0; i < menuItems.length; i++) {
              //Store the menu item to a local variable
              var menuItem:MenuItem = menuItems[i] as MenuItem;
              //Update the current angle of the item
              menuItem.currentAngle += angleSpeed;
              //Calculate a scale ratio
              var scaleRatio = focalLength/(focalLength + menuItem.zpos3D);
              //Scale the item according to the scale ratio
              menuItem.scaleX=menuItem.scaleY=scaleRatio;
              //Set new 3D coordinates
              menuItem.xpos3D=0;
              menuItem.ypos3D=radius*Math.sin(menuItem.currentAngle);
              menuItem.zpos3D=radius*Math.cos(menuItem.currentAngle);
              //Update the item's coordinates.
              menuItem.x=vanishingPointX+menuItem.xpos3D*scaleRatio;
              menuItem.y=vanishingPointY+menuItem.ypos3D*scaleRatio;
         //Call the function that sorts the items so they overlap each other correctly
         sortZ();
    //This function sorts the items so they overlap each other correctly
    function sortZ():void {
         //Sort the array so that the item which has the highest
         //z position (= furthest away) is first in the array
         menuItems.sortOn("zpos3D", Array.NUMERIC | Array.DESCENDING);
         //Set new child indexes for the item
         for (var i:uint = 0; i < menuItems.length; i++) {
              setChildIndex(menuItems[i], i);
    //This function is called when a mouse is over an item
    function mouseOverItem(e:Event):void {
         //Tween the item's properties
         TweenMax.to(e.target, 0.1, {alpha: 1, glowFilter:{color:0xffffff, alpha:1, blurX:60, blurY:60},blurFilter:{blurX:0, blurY:0}});
    //This function is called when a mouse is out of an item
    function mouseOutItem(e:Event):void {
         //Tween the item's properties
         TweenMax.to(e.target, 1, {alpha: 0.3, glowFilter:{color:0xffffff, alpha:1, blurX:0, blurY:0},blurFilter:{blurX:1, blurY:1}});
    //This function is called when an item is clicked
    function itemClicked(e:Event):void {
         //Navigate to the URL that's assigned to the menu item
         var urlRequest:URLRequest=new URLRequest(e.target.linkTo);
         navigateToURL(urlRequest);

    Hi Ned thanks for the reply,
    Ok so I have a button in my main movie that loads the external swf
    stop();
    var my_loader:Loader = new Loader();
    var my_btn:Button = new Button();
    var my_pb:ProgressBar = new ProgressBar();
    my_pb.source = my_loader.contentLoaderInfo;
    my_btn.addEventListener(MouseEvent.CLICK,startLoading);
    function startLoading(e:MouseEvent):void{
    my_loader.load(new URLRequest("carousel.swf"));
    addChild(my_pb);
    my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishloading);
    function finishloading(e:Event):void{
    addChild(my_loader);
    my_loader.addEventListener("killMe",
    killLoadedClip);
    removeChild(my_pb);
    function killLoadedClip(e:Event):void {
    my_loader.removeEventListener("killMe",
    killLoadedClip);
    my_loader.unloadAndStop();
    removeChild(my_loader);
    Then I have a button in my loaded swf that closes the loader
    This is spread over 2 frames
    Frame1
    function closeIt(e:MouseEvent):void {
    parent.dispatchEvent(newEvent("killMe"));
    Frame 2
    back_btn.addEventListener(MouseEvent.CLICK, closeIt);
    Frame 2 also holds all the code for the carousel
    Thanks for your time and help in advance people ; )

Maybe you are looking for