XSQL SVG Example questions

The SVG example provided with the XSQL servlet is excellent and illustrates at least 5 different (and very useful) techniques. Congrats to whoever came up with it.
This one example shows SVG, named templates, use of xsl:variable, use of xsl_param, use of xsl:with-param, use of xsl:call-template and the apparent use of java classes from a jar file ala java server pages.
The example also raises several questions:
1. The example uses two namespace declarations I haven't seen before -
xmlns:Color="http://www.oracle.com/XSL/Transform/java/java.awt.Color"
and
xmlns:Integer="http://www.oracle.com/XSL/Transform/java/java.lang.Integer"
These appear to be allowing the use of Java classes in some jar file similar to the way Java server pages might do it.
It this correct? Is this because these two classes were built-in to the XSQL servlet? What other classes can be used? All of them? From any jar file? Is more documentation available?
2. What does the 'doctype=system="svg-19990812.dtd"' line do? There is no such DTD on my system but the demo works fine. There are references to DTDs with similar names in the FOP samples and in Adobe's samples but the name is slightly different.
3. Why is the media-type image/svg? The SVG 1.0 spec dated 2 Nov 2000 in section 1.2 says the SVG mime type is "image/svg+xml".
4. Why is there no namespace declaration for the svg tag or any of the svg related tags? Samples from other vendors seem to always have a declaration.
Thanks again for a great piece of code.
null

Rick,
You'll find a further-refined, and fully-explained version of the SVG example in Chapter 16 of Building Oracle XML Applications. This chapter covers the use of XSLT extension functions and illustrates how to use Java extension functions with the Oracle XSLT engine.
[list=1]
[*]The two namespaces you list are the way that the Oracle XSLT engine allows you to map extension functions in a namespace to methods of a Java class. This example illustrates using two different built-in classes of the JDK, java.awt.Color and java.lang.Integer. These are not specific to (or built-in in any way to the) XSQL processor or the XSLT engine, but are base classes in the JDK. You can use any Java extension functions in your XSLT stylesheets. The only requirement is that you (1) get the namespace correct to assign a namespace to the appropriate fully-qualified classname, and (2) make sure the classes you want to use are in the CLASSPATH.
[*]The <xsl:output> attribute doctype-system provides a value to be used for the SYSTEM URI of the <!DOCTYPE in the transformed output. The particular value was required by the SVG draft at the time I built the demo. It must be handled by a special entity-resolver built into the SVG Viewer that you're using, which explains why not having on your system as a physical file doesn't stop the demo from working.
[*]The media-type is image/svg instead of image/svg+xml because the SVG demo was built before the final draft of SVG went out. This value was apparently changed in one of the final drafts. It appears that the Adobe SVG viewer registers itself as the handler for both.
[*]See http://www.w3.org/TR/SVG/struct.html#NewDocument. The spec appears to allow both unqualified use of <svg> as well as namespace-qualified <svg:svg> when SVG is embedded within another document.
[list]

Similar Messages

  • XSQL Paging Example Questions - XMLBOOK

    Hi all,
    I run example NewsCategorySimple.xsql?p=2&id=1 from XMLBOOK (S.Muench pag. 650), but it doesn't show stateless paging. shows data, but not: Page 1 of 4 Next - Total 19.
    I run over WNT4/Sp5, Ora816/R2, WEBDB/IAS, XSQL Utility (Examples is good), I don't have jdev 3.1 (is necesary?), my evironment variable CLASSPATH is add c:\xmlbook\samples\ch17\classes;....
    Examples http://localhost/orxmlapp/samples/ch17/store.html is good
    I think what configure Jserv (jserv.conf or jserv.properties) is the problem. can anybody help me
    Thanks..

    thanks, Steve
    now is ok, but i have an other problem, in the URL: http://ias/orxmlapp/Examples/ch17/
    I see the main page (index.html) and the message:
    "No stocks selected" and "You have not selected any news categories... Preferences for roy-ayala". (XMLBOOK pag. 684, Fig. 17-23)
    I added: wrapper.classpath=C:\xmlbook\samples\ch17\classes
    wrapper.classpath=C:\xmlbook\samples\ch06\classes
    in jserv.properties.
    and run all script in ch06 / ch17
    what do you think
    [email protected]
    null

  • SVG Example Source - XSQL

    Anyone from Oracle that could post/provide the source to the XSQL demo at:
    http://209.246.1.89/xsql/demo/svg/svgdemo.html
    Very interested in the stylesheet being used.
    Thanks!
    - Rick
    null

    It's included in the demos that comes with the Oracle XSQL Pages publishing framework.
    Download the XDK for Java, version 8.1.7.1 production or 9.0.0.0.0 beta, and look in the ./xdk/demo/java/xsql/svg
    Chapter 16, "Extending XSQL and XSLT with Java", in my Building Oracle XML Applications book dissects and explains how to do a similar bar-chart example, but in a slightly more modular way than the original demo I wrote was coded.
    Steve Muench
    Lead Product Manager for BC4J and Lead XML Evangelist, Oracle Corp
    Author, Building Oracle XML Applications

  • OCA example questions on Oracle website

    May I ask those with more experience -- the sample OCA exam questions on the Oracle website (not any purchased practice test, just the 8 example questions) seem more devilish to me than any training materials or books I have read. The code is unformatted and unindented, deliberately tricky, static blocks popping up willy-nilly outside of methods and such, and for every question you just have to hack it out line by line. Whereas on practice tests I am scoring well, I got most of these samples wrong at first pass. There's not a single sample question there that's anything like the simple multiple choices I am getting in practice exams about basic concepts such as what is inheritance, what are interfaces, what is an abstract class, etc. etc. I guess my question is -- should I really be getting ready for 90 scary code-deciphering questions, even though my training materials reassure me I am doing just peachy? [I am keenly worried, by the way, about this question making it look like I don't like digging into troublesome code or that I am whining that it is "too hard."]
    P.S. I am such a newbie I guess that I don't know basic things, but I am curious as to what the term "brain dump" means -- I have read on the forum that it is a form of cheating. I infer that it is basically training for exams by using quickie cheat-sheets instead of truly absorbing and knowing the material? Is that the definition? Why in heck would somebody want to get a certification that way if they couldn't actually do the work?
    Best wishes to all.

    967292 wrote:
    May I ask those with more experience -- the sample OCA exam questions on the Oracle website (not any purchased practice test, just the 8 example questions) seem more devilish to me than any training materials or books I have read. The code is unformatted and unindented, deliberately tricky, static blocks popping up willy-nilly outside of methods and such, and for every question you just have to hack it out line by line. Whereas on practice tests I am scoring well, I got most of these samples wrong at first pass. There's not a single sample question there that's anything like the simple multiple choices I am getting in practice exams about basic concepts such as what is inheritance, what are interfaces, what is an abstract class, etc. etc. I guess my question is -- should I really be getting ready for 90 scary code-deciphering questions, even though my training materials reassure me I am doing just peachy? [I am keenly worried, by the way, about this question making it look like I don't like digging into troublesome code or that I am whining that it is "too hard."]
    P.S. I am such a newbie I guess that I don't know basic things, but I am curious as to what the term "brain dump" means -- I have read on the forum that it is a form of cheating. I infer that it is basically training for exams by using quickie cheat-sheets instead of truly absorbing and knowing the material? Is that the definition? Why in heck would somebody want to get a certification that way if they couldn't actually do the work?
    Best wishes to all.I sometimes refer, somewhat cynically as is my way, to the 8 or so samples questions as the 'beta rejects' ... questions that were tried on the beta exam but rejected for the production exam. From my memory (perhaps a little poor) some are less than perfect.
    If you want background on braindumps try the following links:
    http://www.certguard.com/information.asp
    https://blogs.oracle.com/certification/entry/0477
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=562#9
    Edited by: bigdelboy on Oct 23, 2012 8:25 PM

  • XSQL SVG DEMO and Internet Explorer

    Hi all,
    I tried the XSQL SVG demos using IE 6.0 and every time I am asked to down load the file, instead of displaying the svg. The SVG out put is fine, which I tested by saving it with an .svg extension and then reopening it.
    Does anyone know why this is happening and how I can fix it so it just displays the SVG when I click on the link.
    Thanks
    Marco

    Hi All,
    I have resolved the problem. It has to do with the media-type attribute in the xsl:output tag, which I thought, I just was not setting it correctly. Change it to image/svg+xml. Hence you should have the following in SalChart.xsl.
    <xsl:output standalone="yes"
    doctype-public="-//W3C//DTD SVG 20001102//EN"
    doctype-system="http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd"
    media-type="image/svg+xml"/>
    Further information on this demo is found at Re: tab value on insert and why it is set to image/svg instead of image/svg+xml.
    Cheers
    Marco

  • DB Insert Example question

        I want to insert data into a SQL database using the Insert Example.vi, as a base for my code.  I have to add a large number of parameters to the database.  My questions:
    Is there a limit to the number of parammeters I can add?
    I noticed that the example added two parameters (Device name and number of samples)  It then uses "DB tools free object.vi" two times.  Do I have to call the "DB tools....vi" once for every parameter I send?
    thanks
    Bob

    There is no "limit" to the amount of fields that you can pass through an ODBC to SQL other than your connection timing out if it is EXTREMELYYYYY large.... I would guess that for all practical purposes you would not reach this point.
    You can use the Insert Data vi which you would just have to specify the table name that you want to insert. Keep in mid that if you use this functiuon, you need to insert a cluster with THE SAME exact amount of fields as your table in the database. You would use this function if you want to insert a value to every single field in the database. If you dont, then you would use the Execute SQL Query vi, which you would wire a string with your query which in this case would be an INSERT statement.
    I hope this helps.
    Jaime

  • Old Producer/Consumer Example question

    how would I take this code, the old producer/consumer example, and make it for 2 consumers and 1 producer?
    basically, like this:
    Producer put 1
    Consumer #1 got 1
    Consumer #2 got 1
    Producer put 2
    Consumer #1 got 2
    Consumer #2 got 2
    etc.....
    ***********Producer.java***************
    public class Producer extends Thread {
    private CubbyHole cubbyhole;
    private int number;
    public Producer(CubbyHole c, int number) {
    cubbyhole = c;
    this.number = number;
    public void run() {
    for (int i = 0; i < 10; i++) {
    cubbyhole.put(i);
    System.out.println("Producer #" + this.number
    + " put: " + i);
    try {
    sleep((int)(Math.random() * 100));
    } catch (InterruptedException e) { }
    ***********Consumer.java***********
    public class Consumer extends Thread {
    private CubbyHole cubbyhole;
    private int number;
    public Consumer(CubbyHole c, int number) {
    cubbyhole = c;
    this.number = number;
    public void run() {
    int value = 0;
    for (int i = 0; i < 10; i++) {
    value = cubbyhole.get();
    System.out.println("Consumer #" + this.number
    + " got: " + value);
    ***********CubbyHole.java***********
    public class CubbyHole {
    private int contents;
    private boolean available = false;
    public synchronized int get() {
    while (available == false) {
    try {
    wait();
    } catch (InterruptedException e) { }
    available = false;
    notifyAll();
    return contents;
    public synchronized void put(int value) {
    while (available == true) {
    try {
    wait();
    } catch (InterruptedException e) { }
    contents = value;
    available = true;
    notifyAll();
    ***********ProducerConsumerTest.java***********
    public class ProducerConsumerTest {
    public static void main(String[] args) {
    CubbyHole c = new CubbyHole();
    Producer p1 = new Producer(c, 1);
    Consumer c1 = new Consumer(c, 1);
    p1.start();
    c1.start();

    instantiate another consumer.
    public class ProducerConsumerTest {
    public static void main(String[] args) {
    CubbyHole c = new CubbyHole();
    Producer p1 = new Producer(c, 1);
    Consumer c1 = new Consumer(c, 1);
    Consumer c2 = new Consumer(c, 2);
    p1.start();
    c1.start();
    c2.start();
    but then modify CubbyHole so that it checks that it has been consumed twice (as thats what you want, you said). Instead of using boolean available, use an integer flag that counts how many times its been consumed, and then reset the flag when it gets to 2. Something like that. Is this a college question? Do your homework. ha ha.

  • Java Proxies Inside Story Example: questions

    Hi,
    I've tried to implement the example of the document "Java Proxies and SAP XI - The Inside Story, Part II". Actually it's not running and I don't know why. Maybe anybody of you already implemented the described scenario successfully and can support me here:
    InvokeProxy.jsp
    - in the first code line, why is is import="http2Db.ProxyCall"? When I have a look at the coding, I think it should be import="http2Db.InvokeProxy"?
    I've created the EAR project and deployed it to the J2EE Engine. When I try to test the scenario invoking the JSP side I just get back "The page cannot be displayed", the normal browser exception message. How can I check what goes wrong? Here I'm wondering that the Send Button of the HTML form in the JSP page invokes the function proxyfun(). That function itself has the following codeline within:
    document.frm_proxy.action="ProxySender.jsp"
    What's that for a jsp page? I cannot find it in the "Java Proxies[...].pdf"?
    BR
    Dennis

    up
    Has nobody tried this scenario before? Cannot imagine as it's always mentioned when there's a question concerning java proxy implementations as a reference
    I mean the following documents:
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9

  • SVG example

    Hi
    anyone has any example of html / irpt code how I could view the SVG object.
    1. I have SVG dynamic object
    2. I have a simple transaction for it
    3. How do I see it in my webpage??
    thanks.

    Many thanks
    I want to do it different way, I want to call the Runner service directly in the html. I have created the transaction and save the png file.
    http://chsemsapd201:51000/XMII/Runner?Transaction=Demo_Graphic/test&Outputparameter=OutputImage&Content-type=image/png" name="test
    1. The transaction is being called and the image was created but I do not see my image in the web. Does above
    2. Does anyone know where in the help file I could find the usage of Runner ???? I search it but could not find it.
    I also tried this way
    1. Created a BLS to save new immage - succesfull (isee the file)
    2. Created a Xcute for this BLS - succssfull
    3. in HTML 
         <APPLET NAME="test" WIDTH="1" HEIGHT="1" CODE="iCommand" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>
              <PARAM NAME="QueryTemplate" VALUE="Demo_Graphic/xcute">
         </APPLET>
         <img src="/XMII/CM/Demo_Graphic/test.png" >
    4. I see the picture but it does not update the status. (it was old picture). But If I see the picture directly in Workbench it has the new value
    any idea?
    Edited by: Seng Kiang Hoe on Sep 24, 2010 11:03 AM

  • Bluetooth simple client example question

    Dear all,
     I am not sure whether I am close to make it. I update my bluetooth driver {http://forums.ni.com/ni/board/message?board.id=170&message.id=301780#M301780}, so it seem the labview (simple bluetooth server example) can work with my bluetooth (please read the first picture). However, the error message comes up when I run the simple client program. I have a question. Do I have to make the client and the server program in two computer?
     I need your help
    Thanks
    ====================
    =Labview 7.0 & 8.0 & 8.5=
    =====================
    Attachments:
    labview5.JPG ‏203 KB
    labview6.JPG ‏214 KB

    Just want to make a couple things clear
    1. my bluetooth device is working well, after I remove dell driver and using XP bluetooth stack <-----I think
    2. I can run the server without no problem, the problem comes from the client part.
    I have attached the pic from the device manager
    Please help, failure will lose my job
    ====================
    =Labview 7.0 & 8.0 & 8.5=
    =====================
    Attachments:
    labview7.JPG ‏41 KB

  • WL6.1 GA- IIOP examples question

    Hi,
    I have a couple of questions about the WL6.1GA - IIOP example. First when attempting
    to build the example, the ant script halts with the following error:
    compile_client:
    Unable to create client.idl.
    BUILD FAILED
    E:\bea\wlserver6.1>>\samples\examples\iiop\ejb\stateless\cppclient\build.xml:41:null
    On a closer look at the build.xml, the halt occurs with the WL defined ant class:"weblogic.ant.taskdefs.iiop.CppIdlSetup"
    My first question, has anybody else been able to build the example as supplied
    ? Is there any massaging required ?
    As I understand it, the previous step in the build (ejbc) generates the required
    idl interfaces (Trader.idl, TradeResult.idl, TraderHome.idl) for accessing the
    ejb.
    So I'm very curious in seeing what the WL defined ant task is doing and defining
    for ant generated idl (client.idl). Is the src for the WL defined ant task available
    anywhere ?
    Thanks in advance.
    Wayne

    Hi Andy,
    The env. vars were set. Thanks for the
    explanation, I was curious as to the latter :)
    Wayne
    Andy Piper <[email protected]> wrote:
    "Wayne" <[email protected]> writes:
    I have a couple of questions about the WL6.1GA - IIOP example. Firstwhen attempting
    to build the example, the ant script halts with the following error:
    compile_client:
    Unable to create client.idl.
    BUILD FAILED
    E:\bea\wlserver6.1>>\samples\examples\iiop\ejb\stateless\cppclient\build.xml:41:null
    On a closer look at the build.xml, the halt occurs with the WL definedant class:"weblogic.ant.taskdefs.iiop.CppIdlSetup"
    My first question, has anybody else been able to build the exampleas supplied
    ? Is there any massaging required ? This task should be in weblogicaux.jar, this was supposed to have been
    fixed just before release. I will check. Did you set the examples
    environment before running ant?>
    As I understand it, the previous step in the build (ejbc) generatesthe required
    idl interfaces (Trader.idl, TradeResult.idl, TraderHome.idl) for accessingthe
    ejb.Correct, but bugs in Visibroker make it necessary to pre-parse the idl
    into a single file. Inprise have confirmed this as a defect and may
    fix this for the next release of Visibroker at the end of the year.
    So I'm very curious in seeing what the WL defined ant task is doingand defining
    for ant generated idl (client.idl). Is the src for the WL defined anttask available
    anywhere ?All it does is pre-process the idl, e.g. cl -E -Iidl TraderHome.idl >
    client.idl.
    andy

  • Need help with problem using sound and vibration examples. question repost

    I am generating a wav file using the sound and vibration example vi "SVXMPL_Wav Recorder(DAQmx)" using a ni 7422 board.  Then, using the example vi SVXMPL_Getting started with SVT(Simulated)" attempting to play back that file.  the wav file will load and play back on the graphs fine but when I click the "Play Wav File" which sends the audio to the computers speaker,  I get the error "Cannot recognise sound Format".  It plays the shipped example files fine.  I can also play the wav files I generate on a Windows audio player.  Don't know a lot about the sound and vibration toolkit or wav file formats but need to get these two to work together.  Using LV 8.5 and sound and vibration toolkit 4.0.  This is a bit of a repost of the same question ask last week but not answered.  Thanks

    Did you see Coq Rouge's reply in your original thread? Which thread are you going to continue?

  • Query by example questions

    I have a couple questions. I have been using query by example and I really like it. What I want to do though I haven't seen, and i am new enough to toplink that i dont know the best way to do it.
    Say I have a table t with 1 column (name : varchar2)
    What I want to do is a query on name using the like operator (I know how to do this), what I dont know how to do is tell it to ignore case. So for example
    select * from t where upper(name) like 'BU%'; something to this effect.
    Any help greatly appreciated. If I cant do this with query by example which query method would you suggest?

    If you use a QueryByExamplePolicy, you should be able to specify to use likeIgnoreCase for String.
    i.e.
    queryByExamplePolicy.addSpecialOperation(String.class, "likeIgnoreCase");
    If you were using the Expression API this would be,
    builder.get("name").toUpperCase().like("BU%");
    or,
    builder.get("name").likeIgnoreCase("BU%");

  • Scroll bar on clusters example - question

    Hello, 
    I know there are allot of toppics about this subject but I found an example that would do the trick for me. 
    But it won't work. I can scroll but nothing happens...
    I'll post the original example i found and an example to show you how i'm using it. 
    My cluster contains a boolean 2D array and a nummeric 1D array.  
    It is not the actual data but the setup is the same. 
    kind regards, 
    Lore Maris
    Student
    Solved!
    Go to Solution.
    Attachments:
    Cluster_scrollbars_myexample.vi ‏12 KB
    Cluster_Scrollbars.vi ‏12 KB

    i'm affraid I did something wrong again
    I think it could be a solution but it won't fill up. 
    I'll send you the original VI i'm working on. 
    You won't be able to run it though 'cause i'm using hardware. 
    I kept the original layout too so you could see what the idea actually was. But yours is an option too. 
    thanks for your time and effort! 
    Attachments:
    CANExpert opt3.2.vi ‏43 KB

  • Spry Examples - Question

    I'm not sure this is the case but it seems to me there are
    many more examples referenced than on the "samples" page??
    I would like to propose (if not already asked) that we have
    an area that all the Spry examples + some good users examples
    posted with a small description on one page or location. Others may
    have other ideas as well... It just makes it easier than searching
    through the slow forum here.... :o)
    Thanks, Matt M

    You can find it here:
    http://labs.adobe.com/technologies/spry/includes/SpryUtils.js
    Rgds!

Maybe you are looking for