Setting font on the oracle.xml.dbviewer.DBViewer Bean

Hi there,
I'm working with the DBViewer class in oracle.xml.dbviewer. I'm feeding it an XML
doc and XSL to produce output for a query. Everything works fine, however some
of my data is in Unicode (UTF-8) format. I'm unable to set the font in the DBViewer
in order to display the unicode characters. I've tried myDbViewer.setFont(myUniFont)
but that doesn't work.
Do I need to do something to the XSL in order to handle unicode?
Thanks much in advance!
-Toby

Hi there,
I'm working with the DBViewer class in oracle.xml.dbviewer. I'm feeding it an XML
doc and XSL to produce output for a query. Everything works fine, however some
of my data is in Unicode (UTF-8) format. I'm unable to set the font in the DBViewer
in order to display the unicode characters. I've tried myDbViewer.setFont(myUniFont)
but that doesn't work.
Do I need to do something to the XSL in order to handle unicode?
Thanks much in advance!
-Toby

Similar Messages

  • Weaknesses I've come across in the Oracle XML/XSL implementation

    Weaknesses I've come across in the Oracle XML/XSL implementation
    NOTE: I think Oracle is a fantastic database and the XML implementation is lovely to use - also I know these are not limited to XE and also that some are fixed in 11g enterprise however I'm not sure if all are so I am posting here in the hope that Oracle will include fixes for all if any have been missed
    1. getclobval() returns a spurious carriage return on end of the value returned
    2. extract does not handle mixed content tags well (for example it simply discards tags that only have whitespace between them
    3. XSL: using a xsl:number level="multiple" with anything beyond a simple count= xpath value crashes the database completely
    4. XSL: insists on pretty printing output XML which is extremely odd behaviour and causes problems when dealing with mixed content

    Another weakness I've seen is with the appendchildxml function and mixed content xml - it appears to likewise pretty print XML causing the injection of carriage returns and whitespace into mixed content nodes

  • Why the oracle XML parser "parses" the DTD comments?

    Hi all,
    I always use the header
    <?xml version = '1.0' encoding='ISO-8859-1' ?>
    to be able to use foreign characters in the XML documents.
    The oracle xml parser handles this correctly.
    My problem is, when I write comments inside the DTD, the
    parser reports "Invalid UTF8 encoding".
    Why the parser "parse" the comments? (protected by <!-- and -->)
    How do I say that the DTD encoding is different from UTF, like
    ISO-8859-1?
    Example of a correct DTD and corresponding XML, reporting
    problems, related to the 2nd comment in the DTD specification,
    written with ISO-8859-1 characters.
    The DTD:
    <!-- valid.dtd -->
    <!ELEMENT valid ( B, C ) >
    <!-- valid represents the concept "Identificagco" -->
    <!ELEMENT B (#PCDATA) >
    <!ELEMENT C (#PCDATA) >
    The XML:
    <?xml version = '1.0' encoding='ISO-8859-1' ?>
    <!DOCTYPE valid SYSTEM 'valid.dtd'>
    <valid>
    <B>How are you, Conceigco</B>
    <C>I'm fine, thank you.</C>
    </valid>
    The parser output:
    [jgr@frontera test-dtd]$ java oracle.xml.parser.v2.oraxml -v
    valid.xml
    Error while parsing input sourcevalid.xml(Invalid UTF8 encoding.)
    Thank you for any help.
    Jorge Gustavo Rocha

    I was wrong in saying that the attributes are not added to the element.My main aim is to add a array of elements to the root node.
    Is there a efficient manner in adding the elements , rather than adding them individually with the help of appendChild method.
    Thanks in advance.
    null

  • Where is the Oracle XML Team ?

    Hi...
    Just wondering about where these guys from Oracle responsible for
    the XML tools are...
    Well I guessed there are the guys from ORacle responsible for the
    tools... but maybe I'm wrong...
    I'm asking this question cause I've posted some messages here
    they were the few ones able to answer to...
    And I never got any answer back...
    Last example to this : it seemed there's a real problem with the
    printStream() function...
    And as quite nobody here is interested in the xdk for C I was
    expecting an answer from the ORacle XML Team...
    And I'm still waiting...
    But maybe the Team isn't operating any longer...
    Please tell me...
    Thanks

    The team is alive and kicking. Some of us are more experts in
    the Java side of the XDK, so hopefully one of the C/C++ experts
    will respond soon. Many of us are at Oracle OpenWorld this week,
    so might be answering questions at night and between
    presentations from the show floor.

  • Developers, The Oracle XML Portal needs your help!

    The Oracle XML Portal (www.webspedite.com/oracle) is in need of helpful content. I have managed it for over a year now and can't possibly keep up with all the new XDK features coming out. This site has helped over 5,000 developers. I know because I constantly receive e-mails from developers thanking me for maintaining the site.
    Now I need your help to keep it going. All I ask is if you have an interesting code example, bug, or anything related to the XDK's, please send it to me at [email protected] I will add it to the site and give you full credit. I'm even thinking of adding a sponsor page that will advertise your services or company if you make a contribution.
    I look forward to your contribution,
    Jason M Cohen
    The Oracle XML Portal
    www.webspedite.com/oracle

    The Oracle XML Portal (www.webspedite.com/oracle) is in need of helpful content. I have managed it for over a year now and can't possibly keep up with all the new XDK features coming out. This site has helped over 5,000 developers. I know because I constantly receive e-mails from developers thanking me for maintaining the site.
    Now I need your help to keep it going. All I ask is if you have an interesting code example, bug, or anything related to the XDK's, please send it to me at [email protected]. I will add it to the site and give you full credit. I'm even thinking of adding a sponsor page that will advertise your services or company if you make a contribution.
    I look forward to your contribution,
    Jason M Cohen
    The Oracle XML Portal
    www.webspedite.com/oracle

  • How to set Font to the ToolTip in JComboBox

    Hi,
    I am having problem in setting font to the ToolTip for JComboBox.
    Help needed asap...
    TIA,
    CK

    From the Mail menu bar click Mail > Preferences then select the Fonts & Colors tab.
    You can reset fonts sizes from there.
    Another way to open Mail Preferences, with Mail running, press Command ,  (comma) on your keyboard.
    The Mavericks upgrade may have reset that data to factory settings.

  • Set Font to the JTextArea Problem

    Hi all, i've got a problem in setting the font for my JTextArea.
    Here is my piece of code.
    Display.append(Message.getText());
    Display.setFont(selected_font));
    Display is JTextArea, Message is String.
    The problem is i whenever i do this, everytime i change the Font of the Message, the whole messages in the Display font also change.
    What i want is, when i change the font of certain message, that certain message font ( instead of all message) also change in the Display.
    I know the problem is because of the Display.setFont(), it set the font for the whole content inside the Display. Any help to fulfill what i want?

    I'm not sure a JTextArea is appropriate for what you're doing. As its API documentation begins by saying "A JTextArea is a multi-line area that displays plain text. "
    You can set the font used by this component: but the point is that it uses a single font.
    Perhaps you are looking for a JEditorPane (including JTextPane). Check out Sun's tutorial for code examples etc: http://java.sun.com/docs/books/tutorial/uiswing/components/text.html

  • Where is the oracle.xml.sql.query package?

    Hi,
    I have downloaded the xmlparser_v2_0_2_9.zip. I hoped I have everything to compile the example for retrieving XML document with an sql query. However, the jar file is missing the entire package oracle.xml.sql.query which contains for instance the crucial class OracleXMLQuery. Does anyone know where I could get this package - is it part of another download that I have to do, or can I buy it anywhere? Thanks for your help.
    Karel

    It's part of the XML SQL Utility for Java, avialable for download from http://technet.oracle.com/tech/xml

  • Setting ANT_OPTS inside the build.xml

    I am using OAS 10.1.3. For the build process, i am using the ant and jdk inside the OAS itself.
    My problem is that, i need to set the ANT_OPTS everytime before i run the build script.
    I dnt want to do this. Instead, i want to set this somewhere inside the build file itselves.
    I understand that, i can set the ANT_OPTS inside ant.bat in $ANT_HOME and can also set ANT_OPTS in env variables.
    Is there any way, that i can set this option inside the build.xml ?

    Go to ant.jakarta.org. They have numerous tutorials. Do some research first. If you run into an actual problem, then post what it is.
    - Saish

  • Setting font on the label of JTabbedPane tabs

    I want to change the font of a tab in a JTabbedPane if the tab is selected. Is there a way of doing this? I have tried
              Font f = new Font("Times New Roman", Font.BOLD, 12);
              UIManager.put("JTabbedPane.selectHighlight", f);
    and doesn't seem to help.
    thanks.

    I would suspect that selectHighlight is not a color property, not a font property. It might not have separate fonts for selected tabs. JTabbedPane is seriously lacking in several ways. There are other, better tabbed pane implementations out there.
    Generally, though, you'd probably have to create your own tabbed pane UI class to get the effect you want.

  • Availability of the SQL/XML functions (XMLELEMENT, etc.) in Oracle 10g XE

    Hi,
    I have installed Oracle 10g XE on a Windows PC. According to the Oracle XML DB Developer's Guide p.2-1, the installation of the Oracle XML DB can be checked via the following commands:
    select * from all_users;
    describe resource_view
    I ran both commands and got the desired output according to the Developer's guide, i.e.: The user XDB exists and so does the view resource_view. However, when I ran a small test with the XMLELEMENT function, then I got unsatisfactory results:
    Example:
    SELECT
    XMLELEMENT (
    NAME Land,
    XMLATTRIBUTES (L.LCode AS LCode),
    XMLELEMENT (NAME LName, L.LName)
    ) AS Mondial
    FROM Land L;
    Output on Oracle 10g XE:
    MONDIAL
    SYS.XMLTYPE
    SYS.XMLTYPE
    SYS.XMLTYPE
    SYS.XMLTYPE
    Expected output (which I got from a successful run on an Oracle 10g EE Server):
    MONDIAL
    <LAND LCODE="A "><LNAME>Austria</LNAME></LAND>
    <LAND LCODE="F "><LNAME>France</LNAME></LAND>
    <LAND LCODE="D "><LNAME>Germany</LNAME></LAND>
    <LAND LCODE="I "><LNAME>Italy</LNAME></LAND>
    i.e., rather than the four XML elements, I just got four times the output sys.xmltype - which is of course useless. What can I do to get the desired output? Thank you for your help.
    Reini, user524179

    What program are you using to run the sql? Are you sure you are using sql*plus for getting this?
    Output on Oracle 10g XE:
    MONDIAL
    SYS.XMLTYPE
    SYS.XMLTYPE
    SYS.XMLTYPE
    SYS.XMLTYPE

  • Oracle XML Gateway How to download .xgm from the database

    I am trying to find the utitlity called DownloadMap.java to dowload the .xgm mapping from the database as stipulated in the Oracle XML Gateway Users Guide. I am not able to find this utility and could not get any leads.
    Our requirement is to extend the seeded outbound invoice mappings to add additional data elements before generating XML document.
    We will appreciate if any lead or explanation is provided by our community.
    Looking forward for a voice in our community in this regard.
    Thank you,
    Jothiram

    This post is to the wrong Forum, try the XML forum

  • Understanding this message panel with the set font

    heyall, can someone explain to me how this messagepanel class works with setNewFont class, I cannot understand the correlation in the below lines?? i.e. there is no getFont class in the messagepanel so why use it?what does it do?
    //Set font for the message
            Font font = messagePanel.getFont();
            messagePanel.setFont(new Font(font.getName(),fontStyle, font.getSize()));
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class CheckBoxDemo  extends ButtonDemo{
        //Create three check boxes to control the display of message
        private JCheckBox jchkCentered = new JCheckBox("Centered");
        private JCheckBox jchkBold = new JCheckBox("Bold");
        private JCheckBox jchkItalic = new JCheckBox("Italic");
        public static void main(String[]args){
            CheckBoxDemo frame = new CheckBoxDemo();
            frame.setTitle("CheckBoxDemo");
            frame.setLocationRelativeTo(null);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(500,200);
            frame.setVisible(true);
        public CheckBoxDemo() {
            //Set mnemonic keys
            jchkCentered.setMnemonic('C');
            jchkBold.setMnemonic('B');
            jchkItalic.setMnemonic('I');
            //Create a new panel to hold check boxes
            JPanel jpCheckBoxes = new JPanel();
            jpCheckBoxes.setLayout(new GridLayout(3,1));
            jpCheckBoxes.add(jchkCentered);
            jpCheckBoxes.add(jchkBold);
            jpCheckBoxes.add(jchkItalic);
            add(jpCheckBoxes,BorderLayout.EAST);
            //Registar listeners with checkboxes
            jchkCentered.addActionListener(new ActionListener(){
                public void actionPerformed(ActionEvent e){
                    messagePanel.setCentered(jchkCentered.isSelected());
                    jchkCentered.addActionListener(new ActionListener(){
                public void actionPerformed(ActionEvent e){
                    setNewFont();
                    jchkCentered.addActionListener(new ActionListener(){
                public void actionPerformed(ActionEvent e){
                    setNewFont();
        private void setNewFont() {
            int fontStyle = Font.PLAIN;
            fontStyle += (jchkBold.isSelected() ? Font.BOLD : Font.PLAIN);
            fontStyle += (jchkItalic.isSelected() ? Font.BOLD : Font.PLAIN);
            //Set font for the message
            Font font = messagePanel.getFont();
            messagePanel.setFont(new Font(font.getName(),fontStyle, font.getSize()));
    import java.awt.FontMetrics;
      import java.awt.Dimension;
      import java.awt.Graphics;
      import javax.swing.JPanel;
      public class MessagePanel extends JPanel{
        /** The message to be displayed */
        private String message = "Welcome to Java";
        /** The x coordinate where the message is displayed */
        private int xCoordinate = 20;
        /** The y coordinate where the message is displayed */
        private int yCoordinate = 20;
        /** Indicate whether the message is displayed in the center */
        private boolean centered;
        /** The interval for moving the message horizontally and vertically */
        private int interval = 10;
        /** Construct with default properties */
      //  public MessagePanel() {
        /** Construct a message panel with a specified message */
        public MessagePanel(String message) {
          this.message = message;
        /** Return message */
        public String getMessage() {
          return message;
        /** Set a new message */
        public void setMessage(String message) {
          this.message = message;
          repaint();
        /** Return xCoordinator */
        public int getXCoordinate() {
          return xCoordinate;
        /** Set a new xCoordinator */
        public void setXCoordinate(int x) {
          this.xCoordinate = x;
          repaint();
        /** Return yCoordinator */
        public int getYCoordinate() {
          return yCoordinate;
        /** Set a new yCoordinator */
        public void setYCoordinate(int y) {
          this.yCoordinate = y;
          repaint();
       /** Return centered */
        public boolean isCentered() {
          return centered;
        /** Set a new centered */
        public void setCentered(boolean centered) {
          this.centered = centered;
          repaint();
        /** Return interval */
        public int getInterval() {
          return interval;
        /** Set a new interval */
        public void setInterval(int interval) {
          this.interval = interval;
          repaint();
        /** Paint the message */
        protected void paintComponent(Graphics g) {
          super.paintComponent(g);
          if (centered) {
            // Get font metrics for the current font
            FontMetrics fm = g.getFontMetrics();
            // Find the center location to display
            int stringWidth = fm.stringWidth(message);
            int stringAscent = fm.getAscent();
            // Get the position of the leftmost character in the baseline
            xCoordinate = getWidth() / 2 - stringWidth / 2;
            yCoordinate = getHeight() / 2 + stringAscent / 2;
          g.drawString(message, xCoordinate, yCoordinate);
        /** Move the message left */
        public void moveLeft() {
          xCoordinate -= interval;
          repaint();
        /** Move the message right */
        public void moveRight() {
          xCoordinate += interval;
          repaint();
        /** Move the message up */
        public void moveUp() {
          yCoordinate -= interval;
          repaint();
        /** Move the message down */
        public void moveDown() {
         yCoordinate += interval;
          repaint();
        /** Override get method for preferredSize */
        public Dimension getPreferredSize() {
          return new Dimension(200, 30);
      }

    ah right so because there is an import fontmetrics api attached to that is a getFont method......i see now

  • Bpel-108-UsingXQuery $publisher - oracle.xml.parser.v2.XMLElement@8b8e58

    Hello,
    I am using Oracle SOA Suite 11.1.1.4.0 While executing the XQuery example bpel-108-UsingXQuery I am facing the following problem/error.
    The Xquery in the example is:
    xquery version "1.0";
    declare namespace ns0 = "http://example.com/bpel/books";
    declare namespace ns1 = "http://samples.otn.com/xquerysample";
    declare variable $category as node() external;
    declare variable $publisher as xs:string external;
    <bookReport>
    for $b in //ns0:BOOKS/ns0:ITEM
    where data($b/ns0:PUBLISHER) = $publisher
    order by string-length($b/TITLE) return
    <book>
    <author> { data($b/ns0:AUTHOR) } </author>
    <title> { data($b/ns0:TITLE) } </title>
    <price>{ data(doc("pricelist.xml")/ns1:pricelist/ns1:product[1]/ns1:price) }</price>
    <publisher>{ $publisher }</publisher>
    { $category }
    </book>
    </bookReport>
    The variable $publisher, declared in 'declare variable $publisher as xs:string external' shall have the value 'Associated Press' as this has been assigned in the BPEL but it has in fact the value 'oracle.xml.parser.v2.XMLElement@8b8e58'.
    The variable $category has the correct value.
    What is here wrong or is it a bug in 11.1.1.4.0 in the oracle.xml.parser.v2.XMLElement class.

    What a mess:
    org.w3c.Element element = (org.w3c.Element) payload.get("payload");
    private Document writeOraXMLtoDocument(org.w3c.Element payload) throws ParserConfigurationException, SAXException, IOException, TransformerException{
              ByteArrayInputStream inputStream = new ByteArrayInputStream(writeXMLToStream(new DOMSource(payload)).toByteArray());
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder =factory.newDocumentBuilder();
              return builder.parse(inputStream);
         private ByteArrayOutputStream writeXMLToStream(Source source) throws TransformerException {
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    // Prepare the output file
    Result result = new StreamResult(out);
    // Write the DOM document to the file
    TransformerFactory x = TransformerFactory.newInstance();
    Transformer xformer = x.newTransformer();
    xformer.transform(source, result);
    return out;
    Note, that you have to use the oracle transformer located in the xmlparserv2.jar
    if it is not your default transformer , you have to set it at least for the above code by System.setProperty("javax.xml.transform.TransformerFactory","..classname...");

  • Oracle.xml.xsql.XSQLServlet in Java Web Server 2.0

    Does anyone know how to add the oracle.xml.xsql.XSQLServlet in the Java Web Srever 2.0? When running the helloworld.xsql I am now getting the following error message.
    "500 Internal Server Error
    The servlet named oracle.xml.xsql.XSQLServlet at the requested URL
    http://nw601250:8080/xsql/demo/helloworld.xsql
    reported this exception: java.security.AccessControlException: access denied (java.io.FilePermission C:\JavaWebServer2.0\public_html\xsql\demo\helloworld.xsql read). Please report this to the administrator of the web server.
    java.lang.RuntimeException: java.security.AccessControlException: access denied (java.io.FilePermission C:\JavaWebServer2.0\public_html\xsql\demo\helloworld.xsql read) at oracle.xml.xsql.XSQLPageManager.getPage(XSQLPageManager.java:122) at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java, Compiled Code) at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:715) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at com.sun.server.ServletState.callService(ServletState.java:226) at com.sun.server.ServletManager.callServletService(ServletManager.java:936) at com.sun.server.ProcessingState.invokeTargetServlet(ProcessingState.java:423) at com.sun.server.http.HttpProcessingState.execute(HttpProcessingState.java:79) at com.sun.server.http.stages.Runner.process(Runner.java:79) at com.sun.server.ProcessingSupport.process(ProcessingSupport.java, Compiled Code) at com.sun.server.Service.process(Service.java:204) at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:374) at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:166) at com.sun.server.HandlerThread.run(HandlerThread.java:162)"
    I have the alias *.xsql set to map to the servlet named oracle.xml.xsql.XSQLServlet under the Servlet Aliases section, but I'm not sure how to add the servlet under the Servlet section, as I'm guessing that this is the problem I'm now experiencing. I tried adding oracle.xml.xsql.XSQLServlet as both the servlet name and class, but this is not working.
    Any help would be greatly appreciated. Thanks!

    Rani,
    The following is part of a message that was posted back on Nov. 7 of '99 from Steve Muench. I just followed this exactly with the Java Web Server 1.0.1 and it worked fine (including adding the classpath settings and xsql servlet mappings as it says below). Thanks,Dan
    Here's the steps I just followed to run all the XSQL Demos under JSWDK 1.0.1
    (1) Downloaded jswdk1_0_1-win.zip from Sun
    (2) Installed in D:\jswdk-1.0.1
    (3) Edited "startserver.bat" to add the
    classpath entries needed by XSQL Servlet:
    set CLASSPATH=%CLASSPATH%;d:\xsql\lib
    set CLASSPATH=%CLASSPATH%;d:\xsql\lib\classes111.zip
    set CLASSPATH=%CLASSPATH%;d:\xsql\lib\oraclexsql.jar
    set CLASSPATH=%CLASSPATH%;d:\xsql\lib\oraclexmlsql.jar
    set CLASSPATH=%CLASSPATH%;d:\xsql\lib\xmlparserv2.jar
    (4)Edited d:/jswdk-1.0.1/webpages/WEB-INF/servlets.properties and added the line:
    xsql.code=oracle.xml.xsql.XSQLServlet
    (5) Edited d:/jswdk-1.0.1/webpages/WEB-INF/mappings.properties
    and added the line:
    .xsql=xsql
    (6) Copied D:\xsql\demo to D:/jswdk-1.0.1/webpages/xsql/demo
    (7) Started the Webserver with "startserver.bat"
    (8) Browsed http://localhost:8080/xsql/demo/index.html
    (9) Exercised all the demos.
    Hope this helps.
    Steve Muench
    Oracle XML Team

Maybe you are looking for

  • Problem with HP Universal PCL5 and W7x32

    Hi, if i try to connect my Network Printer i get the following error message and my spooler service crashes serveral times a day. The Printer is a HP LJ 2300 The Printer Server is SBS2003 (all Updates)  it is the actual universal printer driver / plz

  • Iweb SEO tool won't upload to FTP

    Hello I had success last month, when I had to migrate my iweb site to Godaddy for hosting, but now when I try to use iweb SEO to publish it via FTP, it times out. I get "connection lost", or just a "beep" as an error message. I'm using iweb SEO tool

  • Convert EBCDIC to ASCII and ASCII to EBCDIC in PI7.0 SP14

    Wea re going to be implementing PI7.0 SP14. I am writing the technical specification for an inbound/outbound interface into/out of ECC 6.0! I need to convert the File that is created out of SAP into EBCDIC in PI and for the inbound convert the file f

  • How to retrieve the BRF+  function result data object of type table in ABAP

    Hi, I am calling a BRF+ function from Abap....If the result data object of the function is element then i am able to get the value back in ABAP...Suppose the result data object of the function is of table type,I couldnt retrieve the value....Can you

  • Troubleshooting speakers and microphone

    Hi, My 06 2 GHz Intel Core Duo iMac's (running 10.6.8) speakers and internal microphone just stopped working afew hours ago.  I have not loaded anything new or changed any settings.  I checked the "Sound" settings under Hardware in System Preferences