Html output genreated by the xsl should have a single quote

hi
i am trying to convert the xml into html .
For one particular field i need to invoke a javscript method on
click. a value has to be passed to this javascript method. for
this i need a single quote or a double quote to come in the
output.
<a href ="javascript:loadPage('Student')"/> is what my output
should look like but i ma getting it as
<a href ="javascript:loadPage(&apos;Student&apos)"/> which is
invalid.
i am constructing the string like
<xsl:variable name="pageName" select="'Student'"/>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('javascript:loadPage
(',&apos;,$pageName,&apos;,')')"/>
</xsl:attribute>
Also i tried declaring a variable and using it instead of &apos;
<xsl:varaible name="squote">'</xsl:variable>
how to overcome this problem ?

This was a bug in 9.0.1
It's fixed in 9.0.2. For example, using the following slight
modification of your example with 9.0.2D Beta, I get the right
answer:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="pageName" select="'Employee'"/>
<xsl:variable name="apos">&apos;</xsl:variable>
<a>
  <xsl:attribute name="href">
    <xsl:value-of select="concat('javascript:loadPage(',
                                 $apos,
                                 $pageName,
                                 $apos,
                                 )"/>
  </xsl:attribute>
foo
</a>
</xsl:template>
</xsl:stylesheet>Notice that I've created a variable named apos and use
that in the concat() instead of directly using the character
reference. This makes things clearer, I think, and easier to
look at visually.

Similar Messages

  • I've just brought some video from itune, but realised the I should have brought the SD version instead of HD version as my iPad didn't have enough storage. Can I change that from HD to SD?

    I've just brought some video from itune, but realised the I should have brought the SD version instead of HD version as my iPad didn't have enough storage. Can I change that from HD to SD?
    Does it mean that I can't watch it if I cannot download it?

    this helps. check it out! http://support.apple.com/kb/ht3209

  • I have my catalog "Back Up Each Time Lightroom Exits" checked, and always have. That means the catalog should have been backed-up and saved everyday, if not more than once on some dates. So with a a major problem now and needing to use the Catalog backup

    I have my catalog "Back Up Each Time Lightroom Exits" checked, and always have. That means the catalog should have been backed-up and saved everyday, if not more than once on some dates. So with a a major problem now and needing to use the Catalog backup from last Friday, I go to my Lightroom Backups folder - and the most recent one showing not only isn't yesterday, it's OCTOBER 28 !?? Where the hell are the daily backups between October 28 and November 14?

    Oh wow - JET LAG strikes agin - my apologies; I have located the missing weeks of back-ups. After getting home from a 30-day trip to Europe, I had changed the location of my LR catalog back-ups to an external drive, and forgot that I did that. I have found them, and all is good. Never operate Heavy Machinery without enough rest. Cheers

  • So I had my photostream on when i first go it but then I turned it off and the photos should have been deleted. Somehow when I go to my settings usage photos, it still shows me that it takes up 2.3GB. How do I delete this?

    Some help would be appreciated.

    When you look at that button that says "Photos & Camera" and shows you the 2.3GB number, it should have an arrow at the right side.
    Click the button.  It will break down where the 2.3GB are located.  They may, for example, be on your camera roll.

  • Shouldn't the 7800 should have 512MB RAM?

    Hi all,
    I was just wondering, the 7800GT in my Quad only has 256MB of Video RAM, and this is the standard version that Apple offers. However, according to the nVidia website, all 7800 cards (including the Mac version) ship with 512MB.
    What's the deal?
    Thanks,
    -Travis

    Nvidia had 4 versions of the G70 chip on 2 different PCBs.
    The GT version was on a distinct PCB and used 20 Pixel Pipes and ran at 400/500 Mhz.
    The GTX came in 2 different versions, 256 Meg & 512 Meg , on a PSB slightly longer than the GT one. These had 24 Pixel pipes. The 256 Meg version ran around 430/1200 while the 512 version was ultra-rare & used expensive 1.1ns RAM. This coupled with hand-picked primo cores allowed this card to run at 550/1700. This jump in RAM speed represents a significant bandwidth jump.
    Neither of these GTX card were offered for Mac by Apple or Nvidia.
    The final version of the G70 was the Quadro, which uses same PCB as the GTX cards and thus also has 24 Pixel pipes, but runs around 470/1300.
    Thus, there was a faster G70 than our Quadro.
    The 7900 has followed a similar naming scheme with it's G71 processor, with the change that speeds for GPU have jumped 100 Mhz or so and all of the cards now have 24 Pixel Pipes.
    Have a read at Barefeats.com. Some BRILLIANT folks have managed to get the Mega 512 card running in Mac
    And you can always hope that Apple will give the PPC a 21 Gun Salute with a 7950 upgrade as a swan song.

  • Can we have a Single quote in the tooltip text?

    Hi,
    We have some tooltips for the presentation columns which contains a single quote.
    When I try to view the tooltip from answers the single quote is being replaced by double quotes.
    I tried to use all sorts of escape characters for single quote, like "\'" and ''' and "'" but that didn't work.
    Is there any way to do this.
    Thanks!!
    Vasantha.P

    As I said in my earlier post, I am looking for the tooltips for the Presentation tables and columns. The tooltips for these were extracted from the RPD using the externalize Strings option and these externalized strings are stored in the database.
    So I am escaping the single using a single quote both in rpd and in the database.
    Example text I have used both in the rpd and database is something like "Shipment's start time". I tried with "Shipment''s start time", " Shipment'''s start time", but it didn't work.
    Thanks!!
    Vasantha.P

  • I want to create a Firefox Extension which will display a webpage. It will be like user should write a something in browser like "about:webpage" How can i load the WebPage in Firefox. The user should have a feel that a webpage is being loaded.

    My extension on clicking something should open a webpage and that webpage should be able to communicate with the servers.
    PS: I have javascript and CSS in that Page. If i cannot make then what changes do i need to make in the web page for that change. I am developing as HTML/Javascript does not allow cross domain queries. I hope that cross-domain queries are possible if i use extension.

    You may find [https://addons.mozilla.org/en-US/firefox/developers this] a useful resource :)

  • The N96 should have been released on April Fools d...

    Hi All
    Im really sorry to rant but I just got my N96 upgrade this morning and will be sending it back for my first ever Sony Erricson this afternoon.
    Its HUGE, slower than my N95 8GB and the vast majority of functions do not work. I am totally unable to transfer my files from one phone to another, upgrade the firmware or even copy music to the device. The camera takes blurry pictures (nothing covering the lens) and the speakers sound worse than my N95's.. Even after 18months use!
    I have been a Nokia user since the 402. Vodafone charged me £20 for the pleasure of upgrading to the Nokia N96 (apparently due to die-hard fans and Nokia being greedy) but im deeply dissapointed and feel its nothing more than a bad joke.
    To the end of an era!
    IHA
    If you were to cut my arm off it would read 'Nokia / Symbian' like a stick of rock.
    6680, N70, N73, N95, N95 8GB, N96

    you're all right.n96 is the biggest flop of nokia in 2008 in high end fones.nokia should take care about the quality control , which is in ruins for many regions, if not finland.my n81 went to the nokia care twice in two months and was finally replaced the third time!!.poor correspondence is what is rendered by team nokia.one can see the nokia care centres flooding nowadays(i do accept the mobiles increase manifold every year,but still see the kind of complaints....)
    Nokia better take care of the quality control as it is not too late to lose the majority of the customers who trust nokia >>
    Make the most of now - tommorow is ANOTHER day
    Please click KUDOS if you like my reply !!
    N82 v31 hckd
    N81 v21 hckd

  • Each item in the delivery should have separate invoice

    HI friends,
    who to do separated invoice for each item of the delivery, even if the bill to party and billing dates are same.
    thanks
    nitchel

    Hi,
    Rather than block individual items manually each time an invoice is raised, a copy control routine can be written in which you can modify item level split criteria which is explained below in detail.
    In VOFM transaction, go to 'Data Transfer' and choose 'Billing Documents'. You can see a list of routines which can be used in copy control configuration. Define a new routine in this list (501 for example).
    Copy the piece of code from routine 001 (include FV60C001) to this new routine and add another field 'POSNR' to the structure ZUK. Copy delivery item number to ZUK-POSNR (ZUK-POSNR = LIPS-POSNR) before ZUK gets assigned to VBRK-ZUKRI.
    Then assign this routine in the item level copy control of delivery to billing of the respective document types. This will ensure that as many invoices get generated as there are delivery items.
    But before that, decide the scope for this invoice split, i.e. for what document types / organizational units, etc. this is required. These checks may be added as initial conditions in the routine before LIPS-POSNR is copied to ZUK.
    Cheers,
    KC
    PS: I had earlier tried some other split criteria which worked fine. If this doesn't work as it is described above, you may have to do minor fine tuning but the idea of splitting invoices by tweaking ZUKRI will certainly work.

  • JTable: After one row is modified, the row should have red color background

    After one row is modified(using setValueAt()),
    I want the modified row to have red color background color.
    How can I do that? I tried.
    JTableInstance.setBackground( Color.RED);But it sets all the rows not the only modified row.

    import java.awt.*;
    import java.util.ArrayList;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableChangeTest extends JFrame {
        public TableChangeTest() {
            initComponents();
            renderer = new MyTableRenderer();
            table.setDefaultRenderer(String.class, renderer);
            int row = 0;
            table.setValueAt("test1",row,0);
            rowsChanged.add( row );
            row = 2;
            table.setValueAt("test2",row,1);
            rowsChanged.add( row );
        private void initComponents() {
            panel = new JPanel();
            scrollPane = new JScrollPane();
            table = new JTable();
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            setTitle("Table Change");
            panel.setLayout(new BorderLayout());
            table.setModel(new DefaultTableModel(
                    new Object [][] {
                        {"1", "a"},
                        {"2", "b"},
                        {"3", "c"},
                        {"4", "d"}
                    new String [] {
                "Title 1", "Title 2"
                Class[] types = new Class [] {
                    java.lang.String.class, java.lang.String.class
                public Class getColumnClass(int columnIndex) {
                    return types [columnIndex];
            scrollPane.setViewportView(table);
            panel.add(scrollPane, BorderLayout.CENTER);
            getContentPane().add(panel, BorderLayout.CENTER);
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width-357)/2, (screenSize.height-241)/2, 357, 241);
        public static void main(String args[]) {
            new TableChangeTest().setVisible(true);
        private JPanel panel;
        private JScrollPane scrollPane;
        private JTable table;
        private TableCellRenderer renderer;
        private ArrayList rowsChanged = new ArrayList();
        class MyTableRenderer extends DefaultTableCellRenderer {
            public Component getTableCellRendererComponent(
                    JTable table,
                    Object value,
                    boolean isSelected,
                    boolean hasFocus,
                    int row,
                    int column) {
                super.getTableCellRendererComponent(table,
                        value, isSelected, hasFocus, row, column);
                setBackground( Color.white );
                if( rowsChanged.contains(row) ) {
                    setBackground( Color.red );
                return this;
    }

  • What the X1 should have been - new Sony Vaio Z details emerge

    http://presscentre.sony.eu/ImageLibrary/DownloadMedia.ashx?MediaDetailsID=199966
    Too bad this isn't the X1.

    http://reviews.cnet.com/laptops/sony-vaio-z-series/4505-3121_7-33976156.html
    Looks good on paper but user reviews aren't too hot.
    Dave
    T430u, x301, x200T, x61T, x61, x32, x41T, x40, U160, ThinkPad Tablet 1838-22R, Z500 touch, Yoga Tab 2 Windows 8.1, Yoga Tablet 3 Pro
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    If someone helped you today, pay it forward. Help Someone Else!
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • In output String should be in single quoted

    Hi All
    How following is achieved.......
    If the string is ABC,PQR,XYZ,......... then in output it should appear as 'ABC','PQR','XYZ','....','.....','.....'
    regards,
    Kalyan

    Hi, Kaylan,
    So you want to add quotes around each comma-delimited sub-string?
    If you replace the commas with quote-comma-quote, then you're almost there; you just need additional quotes at the very beginning and the very end of the string.
    SELECT  Q'[']'
         || REPLACE ( txt
                 , Q'[',']'
         || Q'[']'
    FROM     table_x;The code above works in Oracle 10 and up.
    The version below works in any version of Oracle:
    SELECT  ''''
         || REPLACE ( txt
         || ''''
    FROM     table_x;Edited by: Frank Kulash on Oct 27, 2009 7:21 AM
    Many of the answers below use REGEXP_REPLACE instead of REPLACE. I don't understand why. REPLACE is simpler to use (to the tune of 7 keystrokes) and faster to run.

  • The emoji language should have a giraffe emoji!!!!!

    The emoji should have a giraffe emoji!! how about that?

    It would be pretty difficult, I would think, to squeeze a recognizable giraffe into such a small image. But you can make your suggestion to the Unicode Technical Committee. They are, I believe, the ones who set the standards for emoji characters.

  • StateManager should have the chance to encode URLs

    IMHO, the StateManager should have a chance to encode state information into URLs. Implementations could encode some kind of proprietary session id or put the whole state in an optimized shape into the URL. This is important if an application runs in client state saving mode and must not lose state if the user clicks on a hyperlink.
    My suggestion is to give the StateManager an encodeURL method and specify that the encodeXxxURL methods of the ExternalContext must call it prior to delegation to ServletResponse or PortletResponse.
    Manfred
    mailto:[email protected]
    http://myfaces.sourceforge.net

    Even better solution:
    The ViewHandler gets a new method
    public String encodeURL(FacesContext facesContext, String url) throws IOExceptionHyperlinkRenderers should (must) call this method to encode the href attribute.
    Default ViewHandler implementation calls encodeResourceURL in ExternalContext. In addition to that, If state saving in client is used, a state marker may be added to the url.
    Manfred

  • Help: No Parameters, HTML Output from Java Servlet

    I have a Java Servlet that reads parameters passed from an HTML form and displays them to another HTML page. I know the servlet is being invoked; however, I am not seeing any HTML output. Sending the output to a file reveals the parameters are coming in as NULL as well.
    I attempted a simple sample app with the same results. Here is what I am running:
    The HTML Form:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Collecting Three Parameters</TITLE>
    </HEAD>
    <BODY BGCOLOR="#FDF5E6">
    <H1 ALIGN="CENTER">Collecting Three Parameters</H1>
    <FORM ACTION="ThreeParams">
    First Parameter: <INPUT TYPE="TEXT" NAME="param1"><BR>
    Second Parameter: <INPUT TYPE="TEXT" NAME="param2"><BR>
    Third Parameter: <INPUT TYPE="TEXT" NAME="param3"><BR>
    <CENTER><INPUT TYPE="SUBMIT"></CENTER>
    </FORM>
    </BODY>
    </HTML>
    The Java Code:
    public class ThreeParams extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Reading Three Request Parameters";
    out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
         "Transitional//EN\">\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1 ALIGN=\"CENTER\">" + title + "</H1>\n" +
    "<UL>\n" +
    " <LI><B>param1</B>: "
    + request.getParameter("param1") + "\n" +
    " <LI><B>param2</B>: "
    + request.getParameter("param2") + "\n" +
    " <LI><B>param3</B>: "
    + request.getParameter("param3") + "\n" +
    "</UL>\n" +
    "</BODY></HTML>");
    What happens when I "submit" from the form is the same form reloads with the query string in the URL: "http://localhost:8080/ThreeParams/?param1=1&param2=2&param3=3"
    Any assistance with either (or both) would be thoroughly appreciated:
    a) why the parameters are not being passed correctly to the servlet
    b) why the HTML output page is not displayed
    Thanks in advance!
    - Steve

    I have found the answer to my problem listed in another thread.
    Thank you.

Maybe you are looking for