XSL and XSQL

I am querying a database with XSQL and then returning the results in XML which is interpreted by an XML-stylesheet. The stylesheet is used to convert the xml to html. I have trouble however putting the output from my sql query into the value fields of my xsl-html-to-be document. For example:
<select id="logname" name="LOG_NAME" size="1">
<xsl:for-each select="ROWSET/ROW">
<option value="FOO"><xsl:value-of select="LOG_NAME"/></option></xsl:for-each>
</select>
I would like this value FOO to be the same as what is being displayed, which in this case is the LOG_NAME. I tried to set the value to
<option value = "<xsl:value-of select="LOG_NAME"/>"> however that does not work since the xsl gives me a problem saying that cannot have < after the value = ...
Is there a way to do this. I tried {,( and nothing works.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Hi Patrycja,
if I understood right, I think this could be helpful:
<select id="logname" name="LOG_NAME" size="1">
<xsl:for-each select="ROWSET/ROW">
<option>
<xsl:attribute name="value">
<xsl:value-of select="LOG_NAME" />
</xsl:attribute>
<xsl:value-of select="LOG_NAME"/>
</option>
</xsl:for-each>
</select>
Try it and let me know if it doesn't work
regards,
federico
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Patrycja Missiuro ([email protected]):
I am querying a database with XSQL and then returning the results in XML which is interpreted by an XML-stylesheet. The stylesheet is used to convert the xml to html. I have trouble however putting the output from my sql query into the value fields of my xsl-html-to-be document. For example:
<select id="logname" name="LOG_NAME" size="1">
<xsl:for-each select="ROWSET/ROW">
<option value="FOO"><xsl:value-of select="LOG_NAME"/></option></xsl:for-each>
</select>
I would like this value FOO to be the same as what is being displayed, which in this case is the LOG_NAME. I tried to set the value to
<option value = "<xsl:value-of select="LOG_NAME"/>"> however that does not work since the xsl gives me a problem saying that cannot have < after the value = ...
Is there a way to do this. I tried {,( and nothing works.[/b]<HR></BLOCKQUOTE>
null

Similar Messages

  • Printing with xsql and css or xsl and fop

    How to incorporate css or css2 with xsql?
    I want some sample files. What is FOP? How can we use it for printing and print view

    Thanks for your reply. I know FOP. How to run it with tomcat3.2 and xsql?
    I already onto css1 and css2. XSLT stylesheets are working fine for me. But for taking print outs using the paged media with css2 i require some help. Currently I am reading Oracle XML Applications by Steve Muench from o'reilly.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    See the XSQL Servlet examples. Most of the demos have XSLT stylesheets that generate HTML which includes references to CSS stylesheets.
    FOP is the Apache Formatting Object Processor.
    See the XSQL Release notes for information on using FOP with XSQL Pages for rendering PDF files from database queries.<HR></BLOCKQUOTE>
    null

  • XSL-TEXT: how to import subtemplates in XSL and use xdofx tags?

    Hi,
    I am working on a BI Publisher Report (XML Publisher 5.6.3 in EBS) to generate labels on a label printer. The output needs to be in plain text format, therefore I decided to use the XSL-TEXT template and create my own XSL translation.
    In principle this works pretty fine, but there are two things that worry me a bit:
    1. Does anybody know how I could import other XSL files, like sub-templates in RTF? The problem I have is that I don't know the URI or the sub-template. At the moment I store those other XSL files in the OA_MEDIA folder, but this is not really nice. In RFT you can refer to subtemplates with some xdofx commands... this brings me to my second question:
    2. In RTF templates you can use the Oracle specific XML tags, including the <xdofx:%> and <xdoxslt:%> tags. Does anybody know if and how I can use them in XSL templates?
    Any ideas are highly appreciated!
    regards,
    David.

    Hi Vetsrini,
    1. but what is the absolute path for my subtemplates if I store them in the Template Manager? How can I refer to them?
    This is what the manual says for RTFs:
    >
    Enter the Import Syntax in the Primary Template
    Import the subtemplate to the primary template by entering the following syntax in the
    primary template. The import syntax tells the XML Publisher engine where to find the
    subtemplate RTF in the Template Manager. This syntax may be entered anywhere in the
    template prior to the call-template syntax:
    <?import:xdo://APPCODE.TEMPLATE_CODE.lang.TERR?>
    where
    APPCODE is the Application code you assigned to the subtemplate in the Template
    Manager. For example, if you associated this template with the Receivables application,
    enter "AR".
    TEMPLATE_CODE is the template Code you assigned to the subtemplate in the Template
    Manager. For example, AR_CommonComponents.
    >
    sounds good and easy to me. But I don't have a RTF template. I have just a plain XSLT and those XML Publisher tags do not work there. So how do I get the absolute path of my XSLT templates stored in the Template Manager?
    2. I've included the namespace, no error anymore. But the syntax does not result in actions:
    <xsl:value-of select="xdoxslt:substr((PRODUCT_NAME),1,2)"/>
    {code}
    This does not substring() my string, the full string is returned. But anyway, I don't get an error message anymore. Maybe I just used the wrong XDOXSLT function... I need to search for a list of XDOXSLT functions, but that's not very urgent for now. I think I can do the most with plain XSL and inside the DB itself.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Parsing DOM with XSL and output as HTML

    In a servlet I am fetching data from DB into an DOM-tree (using ordinary JDBC and building the XML-DOM while fetching rows). This is done in a servlet, and before I response to the browser i use Oracle XML-parser to join my DOM-tree with an XSL-file. If I try to my DOM-tree out before parsing, it contains data. But the parsed DOM only contains XSL-tags, no data. What do I do wrong?
    Here is the code:
    DOMParser parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    //No problem finding the XSL-file...
    URL xslURL = createURL("employee.xsl");
    parser.parse(xslURL);
    xslDoc = parser.getDocument();
    XSLStylesheet xsl = new XSLStylesheet(xslDoc, xslURL);
    XSLProcessor processor = new XSLProcessor();
    processor.showWarnings(true);
    processor.setErrorStream(System.out);
    //XML doc does contain data!!!
    DocumentFragment result =
    processor.processXSL(xsl, xmlDoc);
    xmlOut = new XMLDocument();
    Element root = xmlOut.createElement("root");
    xmlOut.appendChild(root);
    root.appendChild(result);
    xmlOut.print(out); // Result is only the XSL-file.....
    Regards Frank =:>

    Sorry, but I still can not make it work. Here are the XSL and XML-files. My XML test file (which reflects the DOM I am makings
    is:
    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE employees SYSTEM "employee.dtd">
    <?xml:stylesheet type="text/xsl" href="employee.xsl" ?>
    <employees>
    <employee>
    <id>1</id>
    <firstname>Frank</firstname>
    <lastname>Nilsen</lastname>
    </employee>
    <employee>
    <id>2</id>
    <firstname>Ronald</firstname>
    <lastname>Reagen</lastname>
    </employee>
    </employees>
    XSL-file is:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
    <xsl:template match="/">
    <HTML>
    <BODY>
    <xsl:for-each select="employees/employee">
    <font color="red"><xsl:value-of select="id"/></font>
    <xsl:value-of select="firstname"/>
    <xsl:value-of select="lastname"/>
    </xsl:for-each>
    </BODY>
    </HTML>
    </xsl:template>
    </xsl:stylesheet>
    Regards,
    Frank =:>

  • XSL and Schema

    I'm using CS3 to create a series of XSL files to transform XML but when i'm in DW, in the bindings tab, when I create a fragment XSL and point it to attach to a remote source I get
    'unable to locate or parse the xml source'
    I'm sure my source is correct
    Thanks

    ottz0 wrote:
     I'm sure my source is correct
    Maybe it is, but without seeing the XML source you're trying to load, it's impossible for anyone to help.
    A quick way to verify that an XML document is correctly formed is to load it into the latest version of any browser except Internet Explorer. If the XML is correctly formed, the browser will display the document tree. If not, it will display an error message.

  • Using resourceDescription in SUBSCRIPTIONBUNDLED_Email.xsl and xml's.

    Hello all,
    We are trying to use the Primitive Template "resourceDescription" (as described in "Customizing Notifications"-pdf) in the SUBSCRIPTIONBUNDLED_EMAIL.xsl and SUBSCRIPTIONBUNDLED_en.xml.
    Could anyone urgently let me know if it's possible to use this Primitive Template in the xsl and xml mentioned?
    It looks like the "resourceDescription" is not being passed on to the bundlednotificationdata-section in the xml?
    Any other suggestion in how to get the "resourceDescription" available in Daily Summary Subscription emails?
    Thanks in advance,
    Tim.

    Hello Alan,
    Yes; as far as I know the only way to get your changes to any of the email notification xml files visible is by restarting the server
    The notification email xsl I'm working on is the one for the daily notifications (subscriptionbundled_email.xsl).
    My problem is that it seems that the resourceDescription is not being passed on by the java code that is populating the section in the xml file containg the resource information...
    Unfortunately no confirmation about this yet (raised OSS with SAP as well).
    I'm expecting this resourceDescription to contain the text that you can fill in using standard KM in the Description field of a resource.
    I do wonder how/where your users populate the subject and description fields? Standard SAP KM or custom app?
    Cheers,
    Tim.

  • Oracle's XML Publisher in JDeveloper and XSQL Servlet

    A While ago, in this thread JDeveloper 10g, XSQL and FOP , was mentioned an ongoing effort for the "integration of Oracle's XML Publisher in JDeveloper and XSQL Servlet", Is this still happening ?, will this be something will be able to use without having to be an Oracle Apps shop? Any additional info would be appreciated.

    Hi,
    is there any progress about XML publisher integration with JDeveloper. I'm right now examining XML publisher but there is no explicit directions and explanations of using XML publisher with jdeveloper.
    any news !?
    best regards...
    --barisk                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • About XML/XSL and Javascript : Plz Help Urgent

    Hai , I am developing one module which invloves XML database ,XSL and Javascript.
    In this I want to transform XML data to XHTML form using XSLT .,
    I have done this ,(using xsl templates ,In my form two radio buttons one dropdown box and two text boxes are there .).
    All the information which ever is displayed coming from XML .,
    But I want to validate this elements (which are in xslt ,ie checking text box is empty or not ..)
    Where I have to add script in XSL .,
    Plz give simple example on this ,
    I am sending this code ,plz have a look at this ,,
    XML -----+ ---XSLT---------------> XHTML(HTML) (where validation is required)*
    Hotels.xml
    ==============>
    <Services>
         <Service>
              <Hotels type="radio" title="Hotel" groupname="service" default="true"/>
              <HotelsFlights type="radio" title="Flight+Hotel" groupname="service"/>
         </Service>
         <Hotels>
              <Destination title_d="Destination :">          
                   <DestinationPlace type="OPTION" id="" title_d="Select Destination" value_d="Select Destination" defalut="true"/>
                   <DestinationPlace type="OPTION" id="" title_d="Aruba" value_d="Aruba" />
              </Destination>
              <HotelChoice title_hc="Hotels :">
                   <choice type="OPTION" id=" " title_h="AmsterDam Manor Beach" value_h="AmsterDam Manor Beach"/>
                   <choice type="OPTION" id=" " title_h="Wyndham Aruba Beach" value_h="Wyndham Aruba Beach"/>
              </HotelChoice>
              <Dates>
                   <CheckIn type="INPUT" title_dt="Check In :" id="chkin" name="chkin" size_dt="10" maxlength="10">mm/dd/yyyy</CheckIn>
                   <CheckOut type="INPUT" title_dt="Check Out :" name="chkout" size_dt="10" maxlength="10">mm/dd/yyyy</CheckOut>
              </Dates>
              <RoomNos title="No.of Rooms :">
                   <room type="OPTION" id="" titl="1" valu="1"/>
                   <room type="OPTION" id="" titl="1" valu="2"/>
                   <room type="OPTION" id="" titl="1" valu="3"/>
              </RoomNos>
              <Submit tile="Search :" type="submit" id="search" value="Search"/>
         </Hotels>
    </Services>
    Hotels.xsl-
    ------------->
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
         <html>
         <head>
         <script language="javascript">
         function RadioFunc()
              var result;
              alert(" Radio ");
              result +=document.write("<TABLE >");
              result +=document.write("<TR><TD>"+'Praveen'+"</TD></TR>");
              result +=document.write("</TABLE>");
              alert("Result "+result);
         function validateForm()
              alert("Before validating");
              var chkindate= document.getElementById(chkin).value;
              alert(chkindate);
         </script>
         </head>
         </html>
         <xsl:apply-templates/>
    <xsl:if test="@value_d='Select Destination'">
                        alert("Please Enter Destination");
              </xsl:if>
    </xsl:template>
    <xsl:template match="Services" >
         <form name="myform" action="two.jsp" method="get" >
              <table bgcolor="lightgreen" width="350" height="200" border="1" >
              <tr><td><xsl:apply-templates/></td></tr>
              </table>
         </form>
    </xsl:template>
    <xsl:template match="Service">
         <table border="0" align="center" valign="top"><tr>
         <xsl:for-each select="*">
              <td align="left"><xsl:value-of select="@title"/></td>
              <td align="center">
              <input type="{@type}" onClick="RadioFunc()">
                   <xsl:attribute name="Name">
                        <xsl:value-of select="@groupname"/>
                   </xsl:attribute>
                   <xsl:attribute name="value">
                        <xsl:value-of select="@value"/>
                   </xsl:attribute>
                   <xsl:if test="@default='true'">
                        <xsl:attribute name="checked"/>
                   </xsl:if>
              </input>
              </td>
         </xsl:for-each>
         </tr></table>
    </xsl:template>
    <xsl:template match="Hotels/Destination">
    <xsl:value-of select="@title_d"/>
         <SELECT id="dest" name="dest">
         <xsl:for-each select="*">
              <xsl:element name="{@type}">
                   <xsl:value-of select="@value_d"/>
              </xsl:element>
         </xsl:for-each>     
         </SELECT>
    </xsl:template>
    <xsl:template match="Hotels/HotelChoice">
    <xsl:value-of select="@title_hc"/>
    <SELECT id="hcid" name="hcid">
         <xsl:for-each select="*">
              <xsl:element name="{@type}">
                   <xsl:value-of select="@value_h"/>
              </xsl:element>
         </xsl:for-each>
    </SELECT>
    </xsl:template>
    <xsl:template match="Hotels/Dates">
    <table><tr>
    <xsl:for-each select="*">
              <td>
                   <xsl:value-of select="@title_dt"/>
              </td>
              <td>
              <xsl:element name="{@type}" >
                   <xsl:attribute name="size">
                        <xsl:value-of select="@size_dt"/>
                   </xsl:attribute>
                   <xsl:attribute name="maxlength">
                        <xsl:value-of select="@maxlength"/>
                   </xsl:attribute>
                   <xsl:attribute name="value">
                        <xsl:value-of select="text()"/>
                   </xsl:attribute>
              </xsl:element>
              </td>
    </xsl:for-each>
    </tr></table>
    </xsl:template>
    <xsl:template match="Hotels/RoomNos">
    <table align="center"><th>Travellers</th>
    <tr><td><xsl:value-of select="@title"/></td>
    <td><SELECT id="rooms" name="rooms">
              <xsl:for-each select="*">
                   <xsl:element name="{@type}">
                        <xsl:value-of select="@valu"/>
                   </xsl:element>
              </xsl:for-each>     
    </SELECT>
    </td></tr>
         </table>
    </xsl:template>
    <xsl:template match="Hotels/Submit">
         <table align="center" border="0" >
         <tr>
         <td align="center">
              <input type="{@type}" onclick="validateForm();">
                   <xsl:attribute name="value">
                        <xsl:value-of select="@value"/>
                   </xsl:attribute>
              </input>
         </td>
         </tr>
         </table>
    </xsl:template>
    </xsl:stylesheet>
    ======================================================

    Hi
    This is not the forum for this type of question ...sorry. Try the XMLDB forum, XML DB
    Tim

  • XSL and a php variable

    I am looking for a solution to a problem I am having with an
    XSL stylesheet and trying to use a php variable. The page I am
    working on is a page to display some information based on the
    graduation year of a class (I work at a school). For example last
    years graduating class of 2006.
    I have a statement in the XSL sheet that limits the shown
    data to only that class year
    <xsl:for-each
    select="school[class_of=&apos;2006&apos;]">
    I would like to replace that 2006 above with a php statment
    such as $classyear since on that page the data is to display the
    variable is already present, but I cannot get it to work. I have
    tried to place php in the XSL and also to change the extention etc
    and they all produce errors. I am assuming that XSL just can't use
    variables in it?
    Any help would be greatly appreciated. I would hate to have
    to duplicate that one XSL sheet for every class year.
    thanks
    chris

    David,
    thank you so much so far for you help, it does sounds like we
    are talking about the same thing. I think I am getting close.
    I do want to pass the value when the XSL sheet is embedded.
    I tried that and it seemed to not work, says the variable is
    not found (I am using the dreamweaver built in transform).
    I am just getting into the more complex XML stuff so I
    apologize for my lack of knowledege.
    I have pasted some of the code below, any idea what I am
    doing wrong?
    the page where it is embedded is
    http://www.nmhschool.org/news/test11.php
    php doc with the embed and include
    <?php
    $mm_xsl = new MM_XSLTransform();
    $mm_xsl->setXML("test11.xml");
    $mm_xsl->setXSL("test11.xsl");
    $mm_xsl->addParameter("yearXX", "2006");
    echo $mm_xsl->Transform();
    ?>
    http://www.nmhschool.org/news/test11.xsl
    is the XSL
    <xsl:for-each
    select="Report/GroupHeader2/GroupHeader2_1[q1.CnPrAl_Class_of =
    $yearXX]">
    <table width="100%" border="1" cellspacing="1"
    cellpadding="1">
    <tr> blah blah blah........
    http://www.nmhschool.org/news/test11.xml
    is the XML data

  • Diff bet  .xsl and  .xslt??

    hi All!
    What is the difference between .xsl and .xslt(generated from xml spy) files
    Are they fuctionally same, and difference between them is just limited to
    like .htm and .html??
    pp

    One has an extra "t" on the end. As for how they are interpreted by various software, that depends on the software in question.

  • Diff between .xsl  and  .xslt

    hi All!
    What is the difference between .xsl and .xslt(generated from xml spy) files
    Are they fuctionally same, and difference between them is just limited to
    like .htm and .html??
    pp

    One has an extra "t" on the end. As for how they are interpreted by various software, that depends on the software in question.

  • Running IIS, JRUN233, and xsql

    I am new to both JRUN and xsql. I couldn't the configuration for JRUN in the XSQL Servlet doc. Can someone post the configuration on JRUN in order to run xsql?
    Thanks.
    null

    I am new to both JRUN and xsql. I couldn't the configuration for JRUN in the XSQL Servlet doc. Can someone post the configuration on JRUN in order to run xsql?
    Thanks.
    null

  • XSL and Javascript

    I had an application running fine with the earlier Servlet version(9.6). It had Javascript embeded into the XSL stylesheet.
    When I moved to the new Servlet version(9.8.6), it is giving me problem .
    For example: this is a sample Javascriptlet inside XSL stylesheet
    <script>
    document.write('<td>Newyork</td>');
    </script>
    On the Html output, the link is pointing to
    city.xsql?city_id='+i+'
    where as it should point to
    city.xsql?city_id=2
    This was working fine with earlier version. How do I make it work. I want the value of "i" in the link not "i" itself.
    Anyone, please help.
    Thanks
    RP
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    The problem is likely that XSU is using the:
    DocumentFragment processXSL(xsl,xml)
    API instead of the:
    void processXSL(xsl,xml,PrintWriter)
    API to accomplish the transformation. The latter lets the XSLT engine do the serialization. The former, uses the DOM to serialize the tree and is not aware of the fancy HTML-output-method rules that XSLT 1.0 specifies.
    The workaround would be to transform the result outside of XSU.<HR></BLOCKQUOTE>
    Steve,
    Thanks. Do you have an example of doing the transformation outside of XSU? Is there a plan for Oracle to use the void processXSL(xsl,xml,PrintWriter)API instead of the current one?
    Thanks again
    null

  • Tool for creating xsl for .xsql

    I am looking for tool that will give me the
    default code for xsl base on a .xsql file as imput.
    What I am looking for is a xsl designer.
    null

    If you are doing HTML you can just start with a well-formed HTML file and:
    (1) Add the xsl namespace to the top element,
    (2) Add in <xsl:for-each> tags where you
    need to loop
    (3) Add in <xsl:value-of> tags where
    you want to plug-in values.
    <html xmlns:xsl="http://www.w3.org/1999/XSL/Transform xsl:version="1.0">
    <body>
    <xsl:for-each select="ROWSET/ROW">
    <tr>
    <td><xsl:value-of select="ENAME"/></td>
    <td><xsl:value-of select="SAL"/></td>
    </tr>
    </xsl:for-each>
    </body>
    </html>
    That's it. We don't yet offer an XSL visual editor.
    null

  • Applying XSL to XSQL gets untrusted server error

    We have an XSQL page containing this line (except I have left off the trailing end of the href string for security reasons):
    <?xml-stylesheet type="text/xsl" href="http://www2.webshoppe.net/..."?>
    and I have stolen Muench's procedure on pp. 121-123 of his book...
    SetJavaSystemProperty('proxySet', 'true');
    SetJavaSystemProperty('proxyHost', 'www2.webshoppe.net');
    SetJavaSystemProperty('proxyPort', '80');
    I have a Java stored procedure to process the XSQL page (and it works very well when I don't use a style sheet). Just before our PL/SQL code calls the Java stored procedure, I do the three SetJavaSystemProperty calls above.
    But we get "untrusted server" errors. Is there some small step I've missed to make all this work?
    Thanks very much!

    You have to add a trusted host in your XSQLConfig.xml. The default works only with the own machine:
    <trusted-hosts>
    <host>127.0.0.1</host>
    </trusted-hosts>
    Hope that helps.

Maybe you are looking for

  • Report should run on "As On Date"

    Hi, I have created a WEBI report connected to BEX Query, which displays Sales Value within Calendar Days between From Date and To Date (User Prompts). The requirement is to have From Date should display "1st Day of the Month with respect to the Curre

  • Working with Word Templates and signed Word macros storing documents in SAP

    HI, we are storing word documents in the SAP BDS. The documents contain macros. The security settings for word macros cannot be reduced in our environment. So the documents / macros were signed. They work well. but as soon as they have been stored in

  • Having problem with adding and reading dates to/from database !!!

    Hi I am new in J2ME I am trying to code a simple software. My problem is with dates. I have a datefield on my menu and the user will choose the date from here. By default, datefield shows todays date. But when I try to write that date to database usi

  • Automatic start of AS Java

    Hi all, is it possible to start an AS Java from command line on a Windows operating system just like the startsap.exe command for an AS ABAP? I need this to start the server after a nightly complete backup automatically. Thanks and best regards, Holg

  • LabVIEW crashes when I save changes to a particular VI.

    LabVIEW crashes when it tries to compile a particular VI. I have managed to get it to work a couple of times by changing a few things and making some subVIs, but the problem keeps returning. Is there some way to fix this or clean the VI of whatever c