XSLT usage with JDOM problem

When I try to do an XSL transformation on a JDOM tree
using Oracle's xml classes from xmlparserv2.jar (includes
the javax.xml.transform api) I get the following:
java.lang.ClassCastException: org.jdom.transform.JDOMSource$DocumentReader
     at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:201)
The same code works with xalan/crimson as well as saxon/aelfred, anyone
seen this and knows a solution? Code snippet:
private Frame transform(Document in, URL stylesheet) {
     TransformerFactory f = TransformerFactory.newInstance();
     InputStream s = stylesheet.openStream();
     Transformer transformer = f.newTransformer(new StreamSource(s));
     JDOMResult out = new JDOMResult();
     out.setFactory(new FPLNodeFactory());
     transformer.transform(new JDOMSource(in), out);
     s.close();
     return (Frame)out.getDocument().getRootElement().detach();
I was wondering if there is a problem with the Oracle's impelmentation or am I using it incorrectly.
Thanks.
Suhas.

This forum is mostly reviewed by folks using the XML features in the database (which basically means version 9.2). This is an XDK question--I would post it to Technologies > XML > General.

Similar Messages

  • EXECUTE IMMEDIATE usage with SEQUENCE problem

    execute immediate 'INSERT INTO ZLYT_IZRACUN_RANGA_METRIK (IID_IZRACUNA_RANGA_METRIKE, POVPRECJE, DATUM_SPREMEMBE, UPORABNIK, IID_TIPA, IID_IZRACUNA, IID_METRIKE) VALUES (:1, :2, :3, :4, :5, :6, :7)'
    using 'zkes_ZLYZIZRAME.nextval', average_rank, sysdate, user, r_types.iid_tipa, r_types.iid_izracuna, r_types.iid_metrike;
    and i get 01722. 00000 - "invalid number".
    How must i use sequence in execute immediate?

    user13256715 wrote:
    execute immediate 'INSERT INTO ZLYT_IZRACUN_RANGA_METRIK (IID_IZRACUNA_RANGA_METRIKE, POVPRECJE, DATUM_SPREMEMBE, UPORABNIK, IID_TIPA, IID_IZRACUNA, IID_METRIKE) VALUES (:1, :2, :3, :4, :5, :6, :7)'
    using 'zkes_ZLYZIZRAME.nextval', average_rank, sysdate, user, r_types.iid_tipa, r_types.iid_izracuna, r_types.iid_metrike;
    and i get 01722. 00000 - "invalid number".
    How must i use sequence in execute immediate?Lose the quotes.
    create table for_immediate_execution
          col1 number primary key
       ,  col2 number
    create sequence s start with 1 increment by 1;
    begin
       execute immediate 'insert into for_immediate_execution (col1, col2) values (:0, :1)' using s.nextval, 2;
    end;
      4  /
    PL/SQL procedure successfully completed.
    TUBBY_TUBBZ?select * from for_immediate_execution;
          COL1      COL2
          4         2
    1 row selected.
    TUBBY_TUBBZ?

  • Does anyone have problems with data usage with att and Iphone5?

    Hello, Does anyone have problems with data usage or non usage I should say with Iphone 5 and AT&T?

    After 4+ months of dealing with this data usage and battery drain problem that included 3 data captures of my wife's iMac, the trigger for us regarding the problems syncing with iCloud, and 5 hours of logs off my iPhone 6 to be analyzed by Apple engineers that included times my wife's computer was both on and off to demonstrate the difference in data usage and battery drain under those conditions, I can say with very reasonable certainty that the iOS 8.3 and corresponding Mac OS 10.10.3 update has solved the problem. 
    We have now been running for about 2 weeks and data usage with the iCloud Servers attempting to sync has dropped from a rate of 31 GBs to under 15 MBs per month.  Yes, you read it right.  We were burning 2000 times as much data doing absolutely nothing important on both of our phones, a 5s and a 6.  Just imagine what that does to battery life!  The 5s would last about 5 hours and the 6 was dead in less than 14.
    The distasteful aspect of this process was how the engineers were quietly fixing the problem at the same time sending messages to my contact person within Apple that were dismissive in nature in the face of indisputable unreasonable results. I must say, this experience with the multiple times the engineers' responses were inappropriate put a little tarnish on the old Apple shine of the ‘It just works’ mantra. This was my first experience in 34 years that caused me to stop recommending Apple products without reservations and with a disclaimer.
    Since the update solved the problem, then I can only conclude that there was a logic bug regarding the reaction within the process to the incoming data that was corrected.  There was noting short of logging out of iCloud that circumvented the problem for us, Gator5000e and probably many others noted on other threads.  I am not trying to imply that this is the cause of everyones battery use problem, but it is reasonable that it was a cause for many.

  • Problem with JDOM and schemas

    I'm trying to parse (and validate) an XML document with JDOM.
    My root element is declared in the schaema whixh is asociated to the document.
    But during parsing, an exception saying that my root element is not declared is thrown.
    Can someone axplain to me what can happen ?
    Thank's

    What's this element ?
    My schema is indicated by the xsi:schemeLocation attribute of my root-element .

  • Urgent :::::.i WISH TO DO THIS WITH JDOM and JAVA .

    file A.XML
    <XML>
    <TP>
    <FF>
    </FF>
    </TP>
    </XML>
    file B.XML
    <XML>
    <TP>
    <GG>
    </GG>
    </TP>
    </XML>
    I WANT TO PASTE node GG in b.xml to a.xml like this
    <XML>
    <TP>
    <FF>
    <GG>
    </GG>
    </FF>
    </TP>
    </XML>
    i WISH TO DO THIS WITH JDOM and JAVA .
    Please let me know how to do this ....
    i dont want to use XSL OR XSLT ...
    i am free for discussions...pls help me
    ciao

    You can try these steps in case of issues with web pages:
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Comparing the BOM usage with the actual usage for materials.

    Hi All
    My client want to compare the BOM usage with the actual usage and have a report for this within a period? More specified they want to calculate the BOM usage, based on the requirement quantity from confirmation - but with out the scrap %. mulitplied with the confimed quantity of the header material.
    The actual usage should be based on  goods issuing from stock, either as goods issue to order (backflushing) or as goods issue to cost center. 
    I havent been able to indentiy a standard report for doing this - does some of you know a standard report?
    -  I was thinking of the following method:
    Look at  tabel RESB and compare it  with MSEG, but I have some diferent problems with this.
      - In resb there is no qty before scrap. 
      - The data amount from MSEG, is so huge so it is not possible to make a data search for a whole period (eg. month)
    Br. M

    There is one std report MCRX which gives a comparison of quanity in order and actual consumption,
    if it doesnt meet your need, you may have to create a custom report.
    logic can be find the quantites as per BOM for the produced quantities
    issued quantities to the order
    tables you may need are AUFK AUFM
    AFKO, STAS STPO
    MSEG, MKPO
    JEST ( if you want to filter using order status)

  • Hello, i have updated my iphone 5 black 16 gb to ios 7 ios 7.0.2 (11a501) and my battery has become worse it gives 9 hours of usage with out doing anything, i have done everything i tried, not using my iphone as well but still no change at all!

    hello, i have updated my iphone 5 black 16 gb to ios 7.0.2 (11a501) and my battery life of my iphone has become worse it gives 9 hours of usage with out doing anything, i have done everything every tip that is available online i had 3gs and 4s so i know how to save battry life,i even tried  not using my iphone as well but still no change at all!. i have upadted to ios 7.0.3 then downgraded it , i thought battery may be an issue ,so i put  brand new battery still no change , so what should i do ? , update to the latest version which is ios 7.0.4 or wait for the ios 7.1 , i was using iphone 4s running on ios 6.1 it gave me 3 days of battery timing , iphone 5 seemed to be very bad for me ,help ! ?
    its facory unlocked btw

    Try to do a reset, if it doesn't work try remove recently added apps this may solve your problem ( like google app because it has happened with me)
    Take a look at apps using your location service in privacy, it can cause battery draining.

  • I have a Panasonic FZ38 HD camera. I can load and view my hd movies onto iMovie with no problems via my camera or a card reader.  When I try to copy my hd videos from my old Windows pc to my new iMac, the picture speed has doubled but the sound is normal.

    I have a Panasonic DMC-FZ38 HD camera and have lots of hd movie clips stored on my old Windows Pc using Photofun software supplied by Panasonic, which I want to transfer to my new Imac computer.   I am able to copy my most recent movies that are still on the memory card from my camera onto Imovie and view them with no problems at all.  When it comes to copying my old existing hd movies stored on my Windows Pc (and which are no longer stored on a memory card), I discover that when I view them on the Imovie, the speed has doubled but the sound is normal.   In order to transfer my old movies I have copied them back  onto a memory card (SDHC - the same card as previously used) and then put the card back into my camera and then copied them onto my Imac via the camera USB.   I have also used a card reader but get the same result.     If I view the same movie through my camera, or look at it on my old pc, it plays at normal speed.    Does anyone have any ideas as to why this is happening please?

    have you read and watch the Tutorials..? :
    http://www.apple.com/ilife/tutorials/#imovie
    iM is a bit.. iffy, when it comes to the definition, what a 'camera' is. historically, only tape based machines were a movie-camera. nowadays still-cams allow movin' images too..
    but, as mentioned above: the intended workflow is: material from photo cameras (even when they move) => import via iPhoto; material from video cameras (even when they don't move.. ) => iMovie
    when the import is done, you'll notice in all iLife apps the 'media browser' - in iM09, on the very right, the icon with a camera on.. click it, presto, all (incl. your 'videos') your iPhoto Library at hand for usage in iMovie.
    watch this:
    http://www.apple.com/findouthow/movies/imovie08.html#tutorial=otherimport
    (about from midths of tutorial...)

  • XSLT Maps with Java enhancements - JCO_SYSTEM_FAILURE

    Hi,
    I have reviewed several postings regarding XSLT Maps with Java enhancements. I followed instructions and build a jar file and the XSLT document. I built one imported archive with the .jar and .xsl. For the class, The path get loaded properly.
    However, I still have a problem when and execute the interface.
    My xslt has the following information
    <xsl:transform version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:ns="http://xyz.abc.sap.def.com"
        xmlns:javamap="java:xyz.Date_Time">
    <xsl:param name="inputparam" />
        <xsl:template match="/">
            <test><xsl:value-of select="javamap:getDateValue($inputparam)"/></test>
        </xsl:template>
    </xsl:transform>
    In SXMB_Moni I get the following error...
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">JCO_SYSTEM_FAILURE</SAP:Code>
      <SAP:P1>Exception in method processFunction.</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>"SYSTEM FAILURE" during JCo call. Exception in method processFunction.</SAP:Stack>
      <SAP:Retry>A</SAP:Retry>
      </SAP:Error>
    If i remove the line        
    <test><xsl:value-of select="javamap:getDateValue($inputparam)"/></test>
    The map ends successfuly.
    Comments would be appreciated.
    Regards,
    Sergio

    Stefan,
    Find the class and method definition below. The method is static and it returns the string.
    ==========
    package xyz;
    import java.util.Map;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.*;
    import java.text.*;
    public class Date_Time {
        private static AbstractTrace trace = null;
        public static String getDateValue(Map inputparam)
                trace = (AbstractTrace)inputparam.get(
                         StreamTransformationConstants.MAPPING_TRACE );
                Date now1 = new Date();
                SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMd");
                String dateString = formatter.format(now1);
                return dateString;

  • Ios6 with wifi problems

    ios6 with wifi problems

    I am just updated my iphone 4 to ios6 and on Sunday it took FIVE times to update. My phone kept freezing up on me. Finally, on the fifth try I was able to get it back. I lost everything on it. Last night I checked my wifi and noticed that it was not holding the wifi password in my own home. Without the ios6 it was fine! Everytime I want to use wifi I have to enter my password. This is extremely inconvenient. Today I checked my data usage with AT&T. I am on limited 200 mb data plan per month. Today is the first day of the month for my plan. So my data begins at zero again on the first day of the new month. I checked my data usage today, and I used 17.3 mb of data in 12 hours! Because I can not use wifi! I am in the fight of my life with Apple. I want them to fix the solution NOW or they send me a new phone....no charge. Those with problems like this should spend the time to fight with them too. They are crooks! Don't let them charge for phone support either. They will rip you off.

  • Have purchased a new computer but can not install elements 12 since it has been installed on old laptop.  Is there a small fee to be able to do this.  Never installed the video editing portion, can this be installed with no problem?

    Have purchased a new computer but can not install elements 12 since it has been installed on an older laptop.  This is a one time user program, is there a code that can be put in or a small fee to pay to be able to use the program again.  Never installed the video editing and hoping this can be installed with no problem.

    If the laptop is still connected Launch Elements in Expert Mode. Go to the help menu and sign-out. That will deactivate usage on the laptop.

  • XML validation with JDOM / JAXP

    Hello,
    I am trying to validate xml file against schema file. I decided to use JDOM and JAXP.
    First question: is it a good choice?
    I did a first attempt but not sure I have understood all what I am doing :(
    First I have create a parser usinf org.jdom.*
    SAXBuilder parser = new SAXBuilderThen I built my document:
    Document doc = parser.build(myFile)These 2 steps are ok. But it does not do validation.
    I saw in the JDOM documentation that I can set a validation flag to true. I did it. First problem, I got the following error from JDOMException: Document is invalid: no grammar found.
    Is there a way to specify to the parser where to find the xsd file?
    As I did not find answer to this question by myself, I tried implementing the Schema class from JAXP:
    SAXBuilder parser = new SAXBuilder;
    Document doc = parser.build(myFile);
    Schema schema = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(schemaFile);
    ValidatorHandler vh = schema.newValidatorHandler();
    SAXOutputter so = new SAXOutputter(vh);
    so.output(doc);It does the validation against the schema file specified but I am not really sure about what I am doing here. The last 2 commands are not clear to me :(
    Then in my schema file, I have elements that have default value. I expected the following behavior: if the element is not in the xml file then the default will be used by the parser (and added in the tree). But it seems, it's not the case.
    Any help/explanation will be really appreciated.

    I am trying to validate xml file against schema file. I decided to use JDOM and JAXP.
    First question: is it a good choice?
    If only schema validation is required use the validation API in JDK 5.0.
    http://www-128.ibm.com/developerworks/xml/library/x-javaxmlvalidapi.html
    http://java.sun.com/developer/technicalArticles/xml/validationxpath/
    For validation with JDOM, the following validation application explains the procedure:import org.jdom.input.SAXBuilder;
    import org.xml.sax.SAXException;import org.jdom.*;
    import java.io.*;
    public class JDOMValidator{
    public void validateSchema(String SchemaUrl, String XmlDocumentUrl){
               try{
    SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser",true);<br/>saxBuilder.setValidation(true);
    saxBuilder.setFeature("http://apache.org/xml/features/validation/schema",true);
    saxBuilder.setFeature("http://apache.org/xml/features/validation/schema-full-checking",true);
    saxBuilder.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",SchemaUrl);
    Validator handler=new Validator();
    saxBuilder.setErrorHandler(handler);
    saxBuilder.build(XmlDocumentUrl);
    if(handler.validationError==true)
    System.out.println("XML Document has Error:"+handler.validationError+""+
    handler.saxParseException.getMessage());      
    else           
          System.out.println("XML Document is valid");
              }catch(JDOMException jde){
                }catch(IOException ioe){
    private class Validator extends DefaultHandler{     
         public boolean  validationError = false; 
         public SAXParseException saxParseException=null;    
      public void error(SAXParseException exception) throws SAXException{        
         validationError =true;
         saxParseException=exception; 
      public void fatalError(SAXParseException exception) throws SAXException  {
    validationError = true;     
    saxParseException=exception;
      public void warning(SAXParseException exception) throws SAXException       {
    public static void main(String[] argv)   {
       String SchemaUrl=argv[0];StringXmlDocumentUrl=argv[1];
       JDOMValidator validator=new JDOMValidator();
       validator.validateSchema(SchemaUrl,XmlDocumentUrl);
    }

  • Huge data usage with Verison 4G LTE hotspot ( Verizon-890L-50DB)

    Recently upgraded my internet service to a Verizon 4G LTE hotspot (Verizon-890L-50DB).  First month - no problems - second month - I have 6GB of overage charges.  Every time I log in to check email or any other minimal data usage task, I get hit with another GB or more of download usage.  My computer is an HP Pavilion Laptop, Windows 7 with NETWORX installed.  Networx tells me it is indeed MY computer that is downloading this data and my hard drive is also showing the increases in data.  
    I've run AVG, Glary Utilities, Speedy PC PRO and Spybot Search and Destroy but found no virus, rootkit or anything on my computer that would explain this problem. 
    When I use a different wireless internet service, I do NOT see the extraneous data usage.
    I contacted Verizon's support team and got no help diagnosing the problem but they did agree to send a replacement for my hotspot device.  Hopefully this fixes the issue; then I have to battle with them about the unwarranted $60 or more in overage charges.
    Has anyone else experienced a problem similar to this?

    I would recomend getting out of the contract before the 14 day trial period ends.   Verizon will charge you an activation fee, restocking fee and one months service, but that is better than being stuck with this mess.  I have homefusion and am afraid to use since verizon seems to fabricate data usage.  Unfortunately I did not realize this untill after the 14 day trial.  Now is will cost me $350 to terminate my contract.
    Date: Mon, 18 Feb 2013 21:21:48 -0700
    From: [email protected]
    To: <Email address removed for privacy.>
    Subject: Re: Huge data usage with Verison 4G LTE hotspot ( Verizon-890L-50DB) - Re: Huge data usage with Verison 4G LTE hotspot ( Verizon-890L-50DB)
                                                                                    Re: Huge data usage with Verison 4G LTE hotspot ( Verizon-890L-50DB)
        created by Lyda1 in Verizon Jetpack 4G LTE Mobile Hotspot 890L - View the full discussion
    Exactly the same thing has happened to me.  I purchased the Verizon Jetpack™ 4G LTE Mobile Hotspot 890L two days ago.  After one day, I had supposedly used half the 5GB monthly allowance.  After two days, I am at 4.25 GB usage.  I don't stream movies, I have the hotspot password protected, I live alone, and no one else uses my computer.  I have not downloaded any large files.  At this rate, I'll go broke soon.
    Reply to this message by replying to this email -or- go to the message on Verizon Wireless Community
    Start a new discussion in Verizon Jetpack 4G LTE Mobile Hotspot 890L by email or at Verizon Wireless Community
    © 2011 Verizon Wireless
    Verizon Wireless | One Verizon Way | Mail Code: 180WVB | Basking Ridge, NJ 07920
    We respect your privacy.  Please review our privacy policy for more information.
                                 Not interested in these emails anymore, or want to change how often they come? Update your email preferences.
    Message was edited by: Verizon Moderator

  • Modifying XML files with JDOM

    Hi:
    I've been trying to get up to speed with JDOM, and while it seems pretty intuitive, I've been having a problem w/ modifying XML documents.
    Namely, once I get a Document object from a (skeleton) XML file, do changes made to the Document object through, say, addContent() propagate to the original file? My gut feeling is no, although this was certainly what I had expected initially.
    Here's a code fragment of what I had tried to do to populate a barebones XML file:
                   Document doc = builder.build(output);
              // add 100 elements, all the same
              for (int count = 0; count < 100; count++)
                   Element curr = new Element("book");
                   // create child nodes for book
                   Element title = new Element("title");
                   title.addContent("Book " + (count + 1));
                   Element author = new Element("author");
                   author.addContent("Author " + (count + 1));
                   Element price = new Element("price");
                   price.addContent("Price " + (count + 1));
                   curr.addContent(title);
                   curr.addContent(author);
                   curr.addContent(price);
                   doc.getRootElement().addContent( curr );
              }

    Mikael,
    This sounds like one of the many quirks (perhaps bugs) related to how FrameMaker handles non-FM files in books. The current book model doesn't play well with XML files as chapters and this seems like yet another problem. Apparently, if an xref does not target another .fm file in the book, Frame assumes that the target file is not in the book and therefore will not be in the book PDF.
    There have been discussions here about this in the past. The solution that I use is to run an API client before publishing that converts all XML files to .fm files, and redirect all xrefs appropriately. Then, book features work as expected and PDFs come out as normal. This is not feasible, however, without the automation from the API client.
    There may be some who would say that the best approach is to use XML and books the way that the designers did account for... that is, the whole book becomes an XML document with entity references to the separate chapters. In my work, though, this model was not appropriate... rather, I needed a binary FM book to act like a book, except with XML files as chapters. So, I think I understand your situation.
    Is API programming or FrameScript an option for you? I think it may be the only way to get what you are looking for.
    Russ

  • How long does the IPhone5c battery last for without hardly any usage with about 2/3 to 3/4 left?

    How long does the IPhone5c battery last for without hardly any usage with about 2/3 to 3/4 left?
    Has the side affect of charging, where the battery's life gradually decreases overall with each charge, been fixed ?

    Eric,
    They did say 12-14 hours, but as is always the case with such estimates, they invariably quote the 'best possible scenario' and almost never mirror 'real world' conditions.
    If, from a fully charged position, you simply switch on your nano, and set it to continuously play through a long set of songs, with EQ off, backlight off, modest volume (50%) don't touch it during playback, then you might just get somewhere near this figure - and if you don't then it's either not been conditioned properly or it's faulty.
    If you use it like me, daily for a couple of hours, with 2 secs backlight and switch songs regularly, using fairly high volumes then 6-8 hours is more likely. It'll even drain when it's not in use, even in sleep mode, albeit very slowly. They also tend to drain more quickly before they've been through their first few charge cycles (the conditioning period).
    Personally I haven't got a problem with this though I can understand why some people have. It's not very impressive in this respect. Apple should be able to come up with something much better - maybe they should talk to Sony

Maybe you are looking for

  • How can I transfer songs from one computers iTunes library to another library?

    How can I transfer songs from one computers iTunes library to another computers iTunes library?

  • OC4J http port in release 2

    i am deploying an oc4j application on release 2. but am not sure what is the oc4j http port from where i can access the web-site of the application deployed. also, what all configurations need to be done to make this work. in release 1, the server.xm

  • How can I remove my mozilla support account?

    How can I remove my mozilla support account?

  • Please ask your , is its explanation true or not

    Hello: you know, indication of battery's power on zen touch's screen is "three squares" that shows how much power. I heard that it is better to charge battery when leave a "square" on the screen of indication of battery's power instead of charging ba

  • Processing Mouse cursor

    hi all , please help on this.. I have developed one swing application in that one button is there the function of the button is to send the values to server .. the problem is If i press the button it takes some time to send values to server .. So is