Choosing a stylesheet in XSQL based on args

I'm wondering if it is possible to choose a certain stylesheet
in a xsql page based on passed arguments. What I am looking to
do is pass a value of either pdf or html and choose the
appropriate stylesheet in the xsql page based on this
arguement. I really don't want to have another layer of
complexity underneath my page, just the stylesheets.

Yes, you can by:
<?xml-stylesheet type="text/xsl" href="{@filename}.xsl"?>
...Thanks for the reply. I forgot to mention the reason that I am
trying to do this is outputs to either pdf or html. My problem
now is that I don't really want to create a custom serializer
(for html output) and trying to pass a serializer of null throws
an error because it cannot be found in my XSQLConfig.xml. Is
there any way to do an <xsql:if> or <xsql:choose> so that I only
add a serializer="FOP" to my xml-stylesheet if the {@filename}="pdf"?
Thanks in advance.

Similar Messages

  • Chaining stylesheets with XSQL!

    I am attemping to post a form to an XSQL page and insert the parameters into an Oracle database. The easiest way to do the tranformation is to apply a stylesheet to the XML generated automatically by the XSQL servelet and then apply another stylesheet to the result of the first transformation. I guess my real question is how can I apply a series of XSLT stylesheets in succession with each one operating on the results of the previous transformation?
    Thank you in advance for your time,
    Jason Long

    Dear Steve,
    My problem is that the <OPTIONS>...</OPTIONS> is not present in the orginal post. I am having a problem selecting this node in order to apply ext:xmlMarkup. The following is the exact code I am trying to use:
    This is the stylesheet that I am applying to the posted request. This works just fine.
    addItem.xsl
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ext="http://www.oracle.com/XSL/Transform/java/MarkupExtensions"
    exclude-result-prefixes="ext">
    <xsl:output method="xml" indent="no" />
    <!-- Root template -->
    <xsl:variable name="sku" select="//sku" />
    <xsl:template match="/">
    <ROWSET>
    <ROW>
    <xsl:apply-templates select="//sku | //quantity | //specialRequests | //customerID"/>
    <OPTIONS>
    <xsl:apply-templates select="//dropDown | //checkbox | //addOn"/>
    </OPTIONS>
    </ROW>
    </ROWSET>
    </xsl:template>
    <xsl:template match="dropDown">
    <dropdown id="{substring-before(text(),'|')}" value="{substring-after(text(),'|')}" />
    </xsl:template>
    <xsl:template match="OPTIONS">
    <OPTIONS>
    <xsl:value-of select="ext:xmlMarkup(*)" />
    </OPTIONS>
    </xsl:template>
    <xsl:template match="addOn">
    <addOn sku="{text()}" />
    </xsl:template>
    <xsl:template match="checkbox">
    <checkbox value="{text()}" />
    </xsl:template>
    <xsl:template match="dropDown">
    <dropdown id="{substring-before(text(),'|')}" value="{substring-after(text(),'|')}" />
    </xsl:template>
    <xsl:template match="quantity">
    <QUANTITY><xsl:value-of select="//quantity" /></QUANTITY>
    </xsl:template>
    <xsl:template match="specialRequests">
    <SPECIAL_REQUESTS><xsl:copy-of select="//specialRequests/text()" /></SPECIAL_REQUESTS>
    </xsl:template>
    <xsl:template match="customerID">
    <CUSTOMER_ID><xsl:value-of select="//customerID" /></CUSTOMER_ID>
    </xsl:template>
    <xsl:template match="sku">
    <SKU><xsl:value-of select="//sku" /></SKU>
    </xsl:template>
    <xsl:template match="submit" />
    </xsl:stylesheet>This is the XSQL page I am sending the request to for insert into the DB.
    addItem.xsql
    <?xml version = '1.0'?>
    <root xmlns:xsql="urn:oracle-xsql" connection="connJMLIE">
    <xsql:insert-request
    table="cart"
    transform="addItem.xsl" />
    </root>Every column is added except OPTIONS. This is null if any "<" are present. This is why I am trying to use ext:xmlMarkup.
    My problem is how do I apply the OPTIONS template to the results of the addItem.xsl in order to escape "<" and add the data as I intended?
    Thank you for your time Steve,
    Jason

  • RH8: How do I choose a stylesheet to apply for all topics?

    I have a RH project created by importing a FrameMaker doc (foo.fm). All (most, but I'm not going to worry about that) of the topics came in okay, and a stylesheet was created and added to my Project Manager: "foo.css".
    Now, I have a different .css file that I want to actually use: bar.css.
    I was able to add bar.css to the Project Manager (thanks to an old forum post), so now I have foo.css and bar.css.
    All of my topics are currently using foo.css. I can change them all to use bar.css by selecting the entire topic list and changing the assigned style guide.
    That leaves me with... how do I ensure *new* topics automatically use bar.css?
    Thanks!

    I will :-)
    I find it helps me construct my topics better when I have the content as wysiwyg as possible during editing (my brain is just wired that way).
    That being said... it looks like the bar.css file has made its way in to the Project Manager, and new topics use that style sheet by default now (as a result of my mass change, I guess).
    So... thanks! (And I'll make sure I watch for that option when I generate the output.)

  • Choose field from joined table based on another field?

    Good morning!
    Is it possible to select a field from a joined table row based on another field? Consider the following data in the CVALUES table:
    ID  C1   C2    C3    C4    C5    C6
    T1  9.6  10.3  12.4  19.6  19.6    0
    T7  9.6  10.4     0     0     0    0
    T3  8.2   9.9  11.4  19.6  19.6    0
    T8  8.3  10.7  13.5  20.7     0    0
    T5  9.4  10.3  12.7  22.9  19.6    0
    ...And the following data in the MDETAIL table:
    ID           MDATE        CNUM     ...
    T1  03/28/2012 18:00:00    4
    T1  03/28/2012 18:00:00    1
    T8  03/29/2012 06:00:00    6
    T8  03/29/2012 06:00:00    5
    ...I want to get the column from CVALUES corresponding to the CNUM field in the MDETAIL table. I'm currently doing this:
    SELECT m.t1, m.mdate,
           CASE WHEN m.cnum = 1 THEN c.c1
                WHEN m.cnum = 2 THEN c.c2
                WHEN m.cnum = 3 THEN c.c3
                WHEN m.cnum = 4 THEN c.c4
                WHEN m.cnum = 5 THEN c.c5
                WHEN m.cnum = 6 THEN c.c6 END AS cvalue
      FROM mdetail m
      JOIN cvalues c ON m.id = c.idThe records in the CVALUES table are unique; only one row per ID.
    This method works, and it's fast but it's messy code and I think there has to be a better way to do it. I use the cvalue value in several calculations so every calculation I use it in has this giant glob of CASE in it!

    Since you're comparing the same column against scalar values, the CASE statement could be simplified in a similar way :
    CASE m.cnum
      WHEN 1 THEN c.c1
      WHEN 2 THEN c.c2
      WHEN 3 THEN c.c3
      WHEN 4 THEN c.c4
      WHEN 5 THEN c.c5
      WHEN 6 THEN c.c6
    END AS cvalueSince performance is not the issue here, now it depends on what you consider "more readable".
    Using a one-liner piece of code certainly makes the query looks less bulky, but I won't be so sure about readability and immediate understanding.

  • Choosing correct optical patch cable based on SFP module

    can someone share information regarding the topic (all cable parameters should pass to a certain SFP module: connector type; mode type; diameter etc)?

    Ok, so you'll need a patch cord of the following specifications: 
    <LENGTH> - You choose whether you want pre-made 10 metres or you can get them to customize the length (will cost more, obviously). 
    Terminating end types - LC to LC (Duplex); 
    Multi-Mode optical fibre;
    OM4 - You can use OM3 if you want but I'd rather use OM4.  Don't even attempt to try OM1 or OM2.  
    <COLOR>-  Your choice.  Normally, OM4 is aqua but you can choose any color you want (may cost more).  DO NOT USE YELLOW as this means a different type of cable (single-mode).  You do not want to make your fibre optic cabling confusing for everyone.  
    NOTE:  If someone wants to sell you an "angle cut" multi-mode fibre, they need to be taken out and shot.  

  • Using web app data to choose css stylesheet

    Does anybody know if this is possible? And how do I get it to work.
    <body class="home "{module_webapps,0,i,4181311 template="/_Settings/business-slogan"}" ">
    This renders:
    <body class="home " No items found."="">
    trying to make it so client can select from a drop of colors choices and the css stylesheet that matches will display.

    Does anybody know if this is possible? And how do I get it to work.
    <body class="home "{module_webapps,0,i,4181311 template="/_Settings/business-slogan"}" ">
    This renders:
    <body class="home " No items found."="">
    trying to make it so client can select from a drop of colors choices and the css stylesheet that matches will display.

  • Portal Stylesheet in RenderListForm-based content

    Hi,
       I have just created an XML forms editor project, where for example I have,
    In the Edit form, an HTML editor control
    In the RenderListForm and ShowForm, labels that would display whatever is entered into the HTML Editor in the Edit Form
       At the same time, I have also made some changes to the theme editor such that standard table cells have a certain background colour, say blue.
       Following that, I authored some content using the above forms. I created a table using the HTMLEditor in my Edit Form. While the table style (i.e. table cells with blue background) is propagated to the content in 'Show' form, it does not affect the content in RenderlistForm.
       My objective is for the same style to affect the content in RenderListForm as well. What can I do to make this happen?
    Thanks,
    Ju

    Just to clarify after further investigation. It seems as if the fault lies not with RenderlistForm, since if I click on 'Preview' button after having edited the form, and I view the created content in the new window that pops up, the RenderListForm displays the content with the style as defined. It is just when I view the 'RenderlistForm' content in a KM navigation iview with layout set 'NewsExplorer' that the style does not seem to be effective.

  • Choose whte records to show based on paramater value

    Post Author: chrisbg
    CA Forum: Formula
    I have a report that will bring back all the customers in table.  Sometimes i want to only select one customer not all the customers. 
    WhileReadingRecords;if {?CustomerCode}='ALL' then{CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_USERID} = {?SessionOperator}else{CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_USERID} = {?SessionOperator} and{CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_CUSTOMER_CODE} = {?CustomerCode}
    after creating this formula the report doesnt even run.  is there a way to say if ALL is value in the parameter then return everything and a customer such as ABC123 is entered only return customer ABC123?

    Post Author: SKodidine
    CA Forum: Formula
    You have two parameters, {?SessionOperator} and {?CustomerCode}.  If the user enters 'ALL' for {?CustomerCode} then you want to fetch all records in the customer table which match that particular userid entered for {?SessionOperator}; otherwise fetch only those records which match userid = {?SessionOperator} and customercode = {?CustomerCode}.  Am I correct?  If that is the case then the below selection criteria should do the job.
    if {?CustomerCode}='ALL' then{CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_USERID} = {?SessionOperator} and {CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_CUSTOMER_CODE} = {CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_CUSTOMER_CODE}
    else{CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_USERID} = {?SessionOperator} and{CFC_PRODUCT_DISCONTINUE_REPORT.CFPDR_CUSTOMER_CODE} = {?CustomerCode}
    Your original formula should work.  If this is not what you expected, could you elaborate and give some examples?

  • Why should we use SUb Class in Forms - Template

    Whatr is the benefit of using SUbcalss properties in Template.fmb
    Edited by: O.Developer on Oct 29, 2012 12:10 PM

    I'll assume you mean that you want to generate HTTP responses from XML streams using XSL transformations.
    It's a good idea because now you can be flexible about how you render responses. You can have one stylesheet for a browser and another for a WAP phone. You can choose the stylesheet to use based on the kind of client you're talking to. New clients simply mean new stylesheets. Very flexible, very nice.

  • AWM 10.2.0.1 - I can not choosing Value Based hierarchy

    I have Oracle client 10.2.0.1 software with AWM 10.2.0.1 . I want to build a dimension with value-based hierarchy . In AWM I have hierarchy editor with the two radio buttons for choosing type of hierachy : Level Based hierarchy and Value Based hierarchy . But the secod one (Value Based hierarchy) is disabled - I can not choosing this type of hierarchy . Why this?
    Thanks in advance,
    Aurel

    Hi there,
    I really would not recommend that you work with the 10.2.0.1 version of AWM. This version is fairly old now and there have been a number of important bug fixes added to more recent releases.
    What version of the Oracle database are you running? And on what operating system?
    I suggest that you consult the following link and ensure that you are working with the versions of BOTH database and AWM that are recommended by Oracle:
    http://www.oracle.com/technology/products/bi/olap/collateral/olap_certification.html
    Thanks
    Stuart

  • ANN: XSQL Servlet 0.9.8.6 Release Available

    Oracle is excited to announce the 0.9.8.6 technology preview
    release of Oracle XSQL Pages and the XSQL Servlet with major
    new functionality.
    -----------------[ Download Info ]-------------------
    http://technet.oracle.com/tech/xml/xsql_servlet/
    Click on "Software" to Download
    Click on "Release Notes" for Full Documentation
    XSQL Pages are server-side XML templates that make it easy
    to exploit the powerful combination of SQL, XML and XSLT to
    prototype and deploy dynamic, data-powered sites and web
    services.
    The XSQL Servlet installs into your favorite Java Servlet
    environment and works with your favorite relational database,
    making it dead easy to:
    -> Assemble XML "DataPages" from multiple SQL Query
    Results (including full support for Oracle8i's
    richly-structured XML Objects Views), local or remote
    XML resources, Stored Procedure Calls, etc.
    -> Transform the "DataPages" in the server using XSLT,
    optionally using stylesheets that are appropriate to
    the requesting client, including the ability to
    let the client to the stylesheet processing for IE5
    or other clients in the future that support this.
    Our online support forum for XML is at:
    http://technet.oracle.com/support/bboard/discussions.htm
    The XSQL Servlet demos (included in the release) are
    installed on Oracle's OTN site and can be tested from the
    comfort of your browser before you download if you choose:
    http://technet.oracle.com/tech/xml/demo/demo1.htm
    This new 0.9.8.6 release includes...
    More Documentation
    ==================
    More extensive documentation and new tutorial material.
    New Demos
    =========
    New and enhanced demos with additional notes describing key
    points each demo is trying to illustrate.
    New API's and JavaDoc
    =====================
    Programmatically process XSQL Pages from your own Java
    programs using a new XSQLRequest object, as well as write
    custom page "action handlers" with new JavaDoc and
    example code.
    New Features
    ============
    <xsql:query>
    The <query> element from previous releases is now part of
    the xsql namespace and is referred to using the new
    <xsql:query> syntax in your XSQL Page. A new section details
    how to use <xsql:query> to produce XML query results with
    nested structure.
    <xsql:dml>
    Do DML and call stored procedures anywhere you need to in
    your XSQL Pages.
    <xsql:stylesheet-param>
    Use parametrized XSLT Stylesheets and set the stylesheet
    parameter values from your XSQL Page.
    <xsql:insert-request>
    Automatically insert posted XML or HTML Form parameters into
    the database.
    <xsql:include-xml>
    Include arbitrary XML resources at any point in your page by
    relative or absolute URL.
    <xsql:include-request-params>
    Include key information like HTTP Parameters, Session
    Variable values and Cookies into your XSQL Page for
    addressing them in your stylesheet.
    <xsql:include-xsql>
    Include the results of one XSQL Page at any point inside
    another. This allows sophisticated combinations of multiple
    XML data sources and multiple XSLT transformations.
    <xsql:include-owa>
    Include the results of executing a stored procedure that
    makes use of the Oracle Web Agent (OWA) packages inside the
    database to generate XML.
    <xsql:action>
    Invoke a user-defined action handler, implemented in Java,
    for executing custom logic and including custom XML
    information into your XSQL Page.
    null

    That error message is outdated and should read:
    Cannot find XSQLConfig.xml in your server-side classpath. The error is definitely that it's not finding XSQLConfig.xml on your classpath. The likely cause is that you did not add the directory:
    ./xsql/lib
    to your CLASSPATH in the JRun Servlet Engine Java environment.

  • How to setup Multiple report layouts based on parameter selection

    I'm trying to create a report that will be based on the parameter values a user select. There will be 3 different layouts for the report.
    Customer
    Salesperson
    Category
    If the user selects one of the three a different layout will be displayed.
    This is probably a simple solution but my Reports 6i skills are a little rusty.
    Your advise would be appreciated.

    Ok so you have a parameter form, and some parameters. In the data model, you can put your 3 queries. In the layout, as Ino said, put all 3 frames that you could possibly have.
    The way I would use to choose which query to use is below. Others may have other methods, but I like this.
    Ok lets say you have query A,B,C for simplicity. You have one parameter (P_PARAM1) on the form, and the user can choose A,B or C. Based on the parameter, you choose which query to use.
    In query A, you would add this line to the where statement:
    and :P_PARAM1 = 'A' You add the same lines to queries B and C, but change the letter obviously. So if the user enters A, it will only run query A because that was the parameter selected.
    Now for the layout, click on the frame that corresponds with group/query A. You would click F11 or launch the PL/SQL editor, and add the following format trigger (or something similar).
    function F_GRP_A return boolean is
    begin
      IF :P_PARAM1 = 'A' then
        return (TRUE);
      ELSE
        return (FALSE);
      END IF;
    end;Ok - then add that same logic to Frame B and C, and based on the parameter it will hide or show the frame.
    Hope that helps - thats a basic way to do what you're looking for!

  • Error in implementing stylesheets

    Hi,
    I created and activated a stylesheet using the tcode "smartstyles"
    I then went to the survey cockpit (tcode "survey") and created a new survey. I then created a questionnnaire using "create questionnaire". In the creation of a questionnaire; I am trying to change the stylesheet using the menu function: Extras->Change stylesheet.
    On choosing the same, a popup with F4 help to choose the stylesheet appears. but neither the stylesheet that I created nor the already existing standard ones appear in the dropdown (the same are found in the stylesheet maintenance using tcode: stylesheet).
    When I type in the name of the stylesheet that I created in this popup and press enter the following error comes up :
    ERROR - "<b>XSLT program Z_TEST_FOR_SURVEY is not available</b>"
    ERROR DETAILS - "<b>Message no. UWS_SURVEY_FORM_GUI028</b>"
    Request your help with resolving the above.
    Regards,
    Dhaval.

    Hello Dhaval,
    if you want to use the survey functionality for CRM Campaign Management you should not use Transaction Code SURVEY. Use CRM_SURVEY_SUITE. Here you can maintain the Stylesheets in the Survey Repository.
    Regards
    Gregor

  • Multiple Universes (based on SAP BI Query) & single WebI Report

    Hi,
    We build OLAP Universes on SAP BI Queries. One of the ways to consume multiple universes in a single WebI report is to "add query" from another universe into the same WebI page / another WebI tab for the report.
    Is there a possibility to pick and choose fields from different Universes (based on SAP BI Queries), into a single WebI report ... of course respecting their technical linkage.
    regards,
    Rajesh K Sarin

    Hi Ingo,
    We have created multiple subject Area Universes (based on SAP BI Queries). Is there a possibility to select a particular object from one of the Universe and another object from another Universe into the same grid eg. Notification Number from Work Management Universe (SAP BI Query based on Customer Service Data Flow / Multiprovider) and Invoice Number from Invoicing Universe (SAP BI Query based on Invoicing Data Flow / Multiprovider). Common aspects for both of these could be say a Customer Account Number.
    As per my understanding, we cannot do this if we have created Universes on SAP BI Queries.
    Nearest possible option is to display two tables on the same WebI report - one from Work Mgmt Universe and other from Invoicing Universe.
    Please guide.
    regards,
    Rajesh K Sarin

  • Filteration of BP Master Data Based On BP Group

    Hello All,
    I have a requirement of blocking those BP Codes to display in the Business Partner Form for a specified BP Group whether
    the User select through Choose From List or Navigate the Form.But the Business Partner details will not be visible to the user
    until the BP Group matches .
    Is that possible through SDK specially the Navigation part .
    Please provide sample codes for that .
    Thanks & Regards,
    Amit

    Hi Amit,
    How did you manage to do this? As I am into a smilar requirement especially the Choose From List.
    I am not able to restrict the choose from list to display based on a selected Sales Person.
    It would be of great help if you would provide code sample to restrict the Choose From List to display BP's only for a particular Sales Person.
    Many Thanks in Advance,
    Regards
    Sameer Shingala.

Maybe you are looking for