Resolving url after document() function has been called by the xslt

I am having problems resolving a URI when document() function in my xslt is called. The xml document that is being called has a reference to a dtd that is in another location of the webserver. When document() is called it downloads the xml document then tries to download the referenced dtd from the same location. I get an error kinda like this.
file:///C:/dev.xsl; Line 15; Column 62; Can not load requested doc: File "http://dev.server.com/templatedata/lhj/story/data/dcr4.5.dtd" not found.
The DTD is in a different location on the server and that is why it can not find it. I have tried resolving the URL but have been unsucessfull. See my java solution that does not work. How can I fix this? Any assistance will be greatly appreciated
Java solution
try {
TransformerFactory tFactory = TransformerFactory.newInstance();
tFactory.setURIResolver(new XMLURIResolver());
Transformer transformer = tFactory.newTransformer(new StreamSource(xslFile));
File f = new File(xmlFile);
FileReader fr = new FileReader(f);
InputSource inputSource = new InputSource(fr);
transformer.transform(new SAXSource(inputSource),
new StreamResult(new FileOutputStream(outPutPath)));
Vince.

here is the resolver. The if in never excuted.
public class XMLURIResolver implements URIResolver{
public static final String DTD_HREF = "dcr4.5.dtd";
public Source resolve(String s, String s1) throws TransformerException{
System.out.println("s = "+ s);
System.out.println("s1 = " + s1);
InputStreamReader isr = null;
try{
if (s.indexOf(DTD_HREF) != -1){
System.out.println("Fetching DTD....");
URL url = new URL("http://mydomain/xml/validation/dcr4.5.dtd");
isr= new InputStreamReader(url.openStream());
return new SAXSource(new InputSource(isr));
}catch(MalformedURLException mue){
System.out.println(mue);
}catch(IOException ioe){
System.out.println(ioe);
return null;
}

Similar Messages

  • How can I see if a function has been called in background task?

    I tried to see sy-batch, but it doesn't work.
    thanks
    Gabriele

    Try calling function module ID_OF_BACKGROUNDTASK.
    DATA: lv_tid type ARFCTID.
    CALL FUNCTION 'ID_OF_BACKGROUNDTASK'
       IMPORTING
         tid = lv_tid.
    IF lv_tid IS NOT INITIAL.
    * This was called with CALL FUNCTION ... IN BACKGRUND TASK.
    ELSE.
    ENDIF.

  • I have an ipad wi-fi cellular 32gb. Died in march after 3 month has been replaced now the replacement has died, holding home key and button on top doesnt work at all,  not even if left over night and the next day and night, still nothing.

    I was given a ipad after xmas 2012. Within a month it was freezing up and returned to apple to replace. It was sent straight back to me saying it was fine. The day I got it back it was faulty again only this time it was worse, it was switching itself off and turning itself back on when it liked. A back up and restore was completed AGAIN. 3 weeks later it was sent straight back to apple to be replaced, this time a higher authority from apple in brisbane said it was to be replaced immediately. Which it was. Then within 6 weeks this ipad the replacemetn ipad has started having issues by turing itself off. Now it has completely shut itself down and off. Charge was at 81%. I put it on charge as maybe the %% was wrong. A few hours later, tried turning it on by holding top button, nothing happened  I have also held down top button and home key for 10 sec, nothing so I tried longer nothing happened. Rang apple support and they have suggested holding top button down for 10 sec then add home key for 10 sec both top button and home for 10 sec then they top button off followed by leaving home key for 10 sec by itself. This did not work. I have tried this again this morning and again at lunch at work and again now tonight. Still nothing at all. Even plugging it into the computer doesn't do anything at all. Has anyone else come across this at all with two ipads doing exactly the same thing. My power points are fine, I've had an electrician check them and my computer is fine aswell. I stumped as to what can be going wrong. Thanks

    Is your battery dead or alive?
    If the battery is dead, we must find out if it is:
    1. Charger problem
    2. Cable problem
    3. Docking port problem
    4. Wall socket problem

  • How do i recover a document that has been "emptied" from the trash?

    I "emptied" my trash, which contained the word document of a file and unfortunately now all i have is the PDF version and I don't want to recreate the entire document.  Any solutions to bring it back? I saw them do it on CSI one time!

    With absolutely no guarantees you may find data retrieval software that may allow you to get the document back.  You would have to stop using your MBP imediatly so that the document is not overwritten (which it already may be).  No freebies in this department.
    If this is worth big bucks to you, you can employ a data recovery firm that also with no guarantees may be able to recover it.
    Time Machine alleviates all such problems.
    Ciao.

  • After a library has been created with the "Copy items to the iPhoto library" option unselected, can it later be made to create those copies?

    iPhoto 9.4.3
    iPhoto Library Manager 3.6.8
    MacBook Pro - OS X 10.7.5.
    I have a large number of iPhoto libraries, organized with iPhoto Library Manager, that I created with the "Copy items to the iPhoto library" option unselected because I wanted easier access to the individual files. I am now going to be migrating to a new computer and have run into some problems with iPhoto losing the path to the file, and as a result showing me the exclamation point of doom. What's more, the program doesn't seem very intelligent about rebuilding those lost connections, and I have to go back through and correct it manually almost one at a time. How do I get around this problem?
    If I rebuild my new computer from a Time Machine backup (I usually enjoy taking this opportunity to start from a clean slate, but...), will the paths all be preserved without me needing to abandon my organization system?
    Or is there some way to ask iPhoto or Library Manager to create and organize copies of all the photos in the library that are not currently present within the library?
    On a tangentially related note, what's the best way to save keywords (and ideally also faces) added in iPhoto to the photos' meta data?
    Much obliged.

    Not with iPhoto by itself.  If you have the lastest version of Aperture and iPhoto referenced libraries can be converted to managed with Aperture.
    You can convert to a managed library with  iPhoto Library Manager by rebuilding the library with iPLM.  This will create a new, managed library with all your photos in it and with all Events, albums, keywords, titles, descriptions and places intact. However, books, calendars, slideshows and cards will not be retained.  They will end up as albums containing the photos.
    OT

  • Java.sql.SQLException: ORA-04062: timestamp of function has been changed

    Hi,
    Environment:
    We host our java 1.5 , j2ee application on multi-clustered environment connecting 2 app servers to 1 node of oracle RAC cluster.
    We have batch jobs running daily in the morning, that does a new data upload to the production DB. (Load to a Tmp table, Drop the production table, rename Tmp table to production table and re-create indexes.)
    Recent Change:
    We recently migrated from Oracle 10.0 version to 10.1...
    Issue:
    With the recent change, we started facing the error, 'ORA-04062: timestamp of function has been changed' for the STORED PROCEDURES that we use in the application. And I am sure that this is because of the job that runs in the morning, as it re-creates the tables that are used by the stored-procedures. So the stored-procedures become invalid and requires recompile. And we did recompile as well, but still the same error. And then changed the mode from 'TIMESTAMP' to 'SIGNATURE', but still the same error(ORA-04062: TIMESTAMP (and not SIGNATURE) of function has been changed)...
    We are stuck here not knowing what to do. It would be helpful if you can assist me here with any idea on why this is happening? The only solution we found right now is to restart the tomcat on application servers. This resolves the issue to 100%. Would this mean there is a problem with my database connection in the application?
    Thank you,
    Pradeep.

    The only solution we found right now is to restart the tomcat on application servers. This sounds to me as though TomCat is caching information about procedures & functions & does not know they have changed.
    04062, 00000, "%s of %s has been changed"
    // *Cause:  Attempt to execute a stored procedure to serve
    //          an RPC stub which specifies a timestamp or signature that is
    //          different from the current timestamp/signature of the procedure.
    // *Action: Recompile the caller in order to pick up the new timestamp.

  • SL500, Product recovery function has been removed from this sytem

    I upgraded my SL500 from Vista to windows 7 OS several years ago and lately the OS has been acting weird (freezing, very slow at times) so I am thinking something is corrupted somewhere and want to restore it back to the manufacturers state.  However, when I try to do this through rescue and recovery, it tells me that the recovery function has been removed from the system.  I'm assuming that when I upgraded from Vista that R&R was no longer compatible so I installed version 4.5.  My laptop did not come with backup OS disks and was told that this was the way to restore the system back to the factory state.  How do I do this if I'm getting this message?

    http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&lndocid=MIGR-62978
    try this. If this don't work then you would to reinstall the OS using the T43 recovery media disk set. 
    Regards,
    Jin Li
    May this year, be the year of 'DO'!
    I am a volunteer, and not a paid staff of Lenovo or Microsoft

  • How to re-trigger BA00 after sales order has been rescheduled

    Dear Gurus,
    Could you please kindly advise how I could re-trigger BA00 after sales order has been rescheduled?
    The scenario is following:
    When the sales order was completed, the order confirmation output has been sent to the customer. But later, when the ATP confirmed quantity was changed or order was rescheduled, the committed delivery date has been changed. It caused confusion, because in the order confirmation letter we sent to customer, there is a different date.
    I'd like to also trigger BA00 to resend the order confirmation, but I checked the output routine, it only checks if the order is completed or not. Shall I ask ABAPer to add additional logic in the routine or there is other easier way to re-trigger BA00?
    Many thanks in advance!

    Have you allowed multiple issue for BA00 output type? In that case, you can manually trigger it from VA02. If you are trying to have it sent automatically, then add the logic into the routine.

  • How to check if a function module has been called dynamically in programs

    Hi,
    I wanted to know if there is a way to check if a function module has been called dynamically in any programs. In SE37, if you click on where used list for a FM, it shows FM not found in programs (Possibly dynamic calls).
    I am checking if the function module /SDF/RBE_EXECUTE_SQL_WRAPPER has been used in any of SAP programs. Your help is greatly appreciated.
    Best regards,
    Siva

    one way will using program RPR_ABAP_SOURCE_SCAN search for complete source codes with a find string RBE_EXECUTE_SQL_WRAPPER .
    PS But it the function module name comes from a table ( Table entry value) then it is difficult to find

  • Set Cursor.vi fails after it has been called for 30 different panel refs in LV 7.1.1

    Make sure both attached files (Run LabVIEW_Cursor_TestCase.vi, SimpleVI.vi) are in the same folder. Run LabVIEW_Cursor_TestCase.vi notice that the -3 error code is returned from "Set Cursor.vi" after it has been called with 30 different panel refs. If "Set Cursor.vi" is replaced with "Set Busy.vi" the same error occurs.Is there a workaround for this problem other that setting the cursor image manually in user32.dll? I must be able to open more than 30 panels and set them all to busy. In the test case I used a single VI, simply to demonstrate the error.
    Message Edited by Jerred on 05-04-2007 10:06 AM
    Attachments:
    LabVIEW_Cursor_TestCase.vi ‏68 KB
    SimpleVI.vi ‏13 KB

    This bug is fixed in LabVIEW 8.0 and later.  Unfortunately, I know of no workaround in LabVIEW 7.x.  When I encountered this bug in one of my UIs in LabVIEW 7.x, my "fix" was simply to ignore the error outputs from the cursor VIs, and to live with the fact that I had no custom cursors after 30 windows had been opened.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • SQLException: After clearParameters() has been called, all parameters must be reset before executing

    Hi,
    I am running: Weblogic 6.1, SP2
    Driver : weblogic.jdbc.oci.Driver
    Reason for not using the "thin" driver, which works, is limit
    on size of Clob
    Previous references to this problem in this newsgroup indicate driver problems
    with older versions of WL.. I am using the latest..
    The SQLException I get is "After clearParameters() has been called, all parameters
    must be reset before executing". This happens the second time the code below is
    excuted ( ok the first time )
    "clearParameters()" is never called explicitly in my code.
    The exception occurs on the "spFunc.execute();" statement at the very end of this
    code:
    // OBS:connection, conn_, is opened from a connection pool
    before this code is called and cloesed afterwards.
    conn_.setAutoCommit(false);
    // ============== Initializing clob ==================
    SerialStatement stmt = (SerialStatement)conn_.createStatement();
    stmt.execute("INSERT INTO lc_clob_temp VALUES (1, EMPTY_CLOB())");
    // OBS: using a prepared statement here will result in SerialClob
    // exception when using setClob in the prepared statement
    below
    // This is probably a bug ( worked in WL 5.1 ). We had this
    as a support case 270952 with WebLogic.
    stmt.execute("SELECT * FROM lc_clob_temp WHERE id = 1");
    ResultSet crs = stmt.getResultSet();
    weblogic.jdbc.rmi.SerialClob xmlClob = null;
    while ( crs.next() ) {
    xmlClob=(weblogic.jdbc.rmi.SerialClob)crs.getClob("newclob");
    // Call Oracle's stored procedure for calling Oracle XSU.
    SerialCallableStatement spFunc =
    (SerialCallableStatement)conn_.prepareCall(
    "declare " +
    "insCtx sys.DBMS_XMLSave.ctxType; " +
    "begin " +
    "insCtx := sys.DBMS_XMLSave.newContext(?); " +
         "sys.DBMS_XMLSave.setBatchSize(insCtx,0);" +      "sys.DBMS_XMLSave.setCommitBatch(insCtx,
    0);" +
    "? := sys.DBMS_XMLSave.insertXML(insCtx,?); " +
    "sys.DBMS_XMLSave.closeContext(insCtx); " +
    "end;"
    spFunc.setString(1, viewName );
    spFunc.registerOutParameter (2, Types.NUMERIC);
    Writer outstream = xmlClob.getCharacterOutputStream();
    outstream.write(xml.toString());
    outstream.flush();
    outstream.close();
    spFunc.setClob( 3, xmlClob);
    spFunc.execute();
    spFunc.close();

    Hi,
    I am running: Weblogic 6.1, SP2
    Driver : weblogic.jdbc.oci.Driver
    Reason for not using the "thin" driver, which works, is limit
    on size of Clob
    Previous references to this problem in this newsgroup indicate driver problems
    with older versions of WL.. I am using the latest..
    The SQLException I get is "After clearParameters() has been called, all parameters
    must be reset before executing". This happens the second time the code below is
    excuted ( ok the first time )
    "clearParameters()" is never called explicitly in my code.
    The exception occurs on the "spFunc.execute();" statement at the very end of this
    code:
    // OBS:connection, conn_, is opened from a connection pool
    before this code is called and cloesed afterwards.
    conn_.setAutoCommit(false);
    // ============== Initializing clob ==================
    SerialStatement stmt = (SerialStatement)conn_.createStatement();
    stmt.execute("INSERT INTO lc_clob_temp VALUES (1, EMPTY_CLOB())");
    // OBS: using a prepared statement here will result in SerialClob
    // exception when using setClob in the prepared statement
    below
    // This is probably a bug ( worked in WL 5.1 ). We had this
    as a support case 270952 with WebLogic.
    stmt.execute("SELECT * FROM lc_clob_temp WHERE id = 1");
    ResultSet crs = stmt.getResultSet();
    weblogic.jdbc.rmi.SerialClob xmlClob = null;
    while ( crs.next() ) {
    xmlClob=(weblogic.jdbc.rmi.SerialClob)crs.getClob("newclob");
    // Call Oracle's stored procedure for calling Oracle XSU.
    SerialCallableStatement spFunc =
    (SerialCallableStatement)conn_.prepareCall(
    "declare " +
    "insCtx sys.DBMS_XMLSave.ctxType; " +
    "begin " +
    "insCtx := sys.DBMS_XMLSave.newContext(?); " +
         "sys.DBMS_XMLSave.setBatchSize(insCtx,0);" +      "sys.DBMS_XMLSave.setCommitBatch(insCtx,
    0);" +
    "? := sys.DBMS_XMLSave.insertXML(insCtx,?); " +
    "sys.DBMS_XMLSave.closeContext(insCtx); " +
    "end;"
    spFunc.setString(1, viewName );
    spFunc.registerOutParameter (2, Types.NUMERIC);
    Writer outstream = xmlClob.getCharacterOutputStream();
    outstream.write(xml.toString());
    outstream.flush();
    outstream.close();
    spFunc.setClob( 3, xmlClob);
    spFunc.execute();
    spFunc.close();

  • ColdFusion 11: allowedextforinclude functionality has changed. But the docs haven't been

    G'day:
    I am reposting this from my blog ("ColdFusion 11: allowedextforinclude functionality has changed. But the docs haven't been") at the suggestion of Adobe support:
    @dacCfml@ColdFusionCan you post your queries athttp://t.co/8UF4uCajTCfor all cfclient and mobile queries.— Anit Kumar Panda (@anitkumar85)April 29, 2014
    This particular question is not regarding <cfclient>, hence posting it on the regular forum, not on the mobile-specific one as Anit suggested. I have edited this in places to remove language that will be deemed inappropriate by the censors here. Changes I have made are in [square brackets]. The forums software here has broken some of the styling, but so be it.
    G'day:
    Remember this one: "ColdFusion 11: preventing files from being included? [WTH], Adobe?". I can confirm this verymoderatelyslightly contentious feature has been changed in ColdFusion 11, but the docs have not been updated to reflect the change.
    The issue is summarised thus (from the article linked-to above):
    [...]out of the box ColdFusion 11 will only allow the inclusion of CFML and HTML files. Why? They cite "for security reasons". Here's a quote (posted in the bugtracker, originally from the pre-release forums):
    "Vamseekrishna Manneboina: Yes, this was done as part of a security measure. You can now only include CFM/CFML files by default. You can specify additional extensions via a property called allowedextforinclude in neo-runtime.xml. By default, HTM and HTML file extensions are already added to this list/property, thereby allowing for inclusion of HTM and HTML files too by default."
    OK, I disagree there's merit in this, some others agree, others disagree. But... so be it. I actually thought - if I was in a charitable mood - that the people that were "for" this change made a reasonable case for its inclusion, so - whilst not agreeing with them - I was content to just shrug and go "yeah, oh well".
    Now this feature is still in the docs: "New in ColdFusion 11 - Restrictions", but this is not the way it now works. Initially I thought it had been removed completely (and I am now in the midst of retooling this article from saying that... as I only worked out what was going on 2/3rds of the way through writing it).
    I did a secure install the other day, and one of the first things I tested was this:
    <!---test.cfm---> <cfset message = "before"> <cfoutput> #message#<br> <cfinclude template="code.inc"> <cfset message = "after"> #message#<br> </cfoutput>
    <!--- code.inc ---> <cfset message="within"> <cfoutput> #message#<br> </cfoutput>
    And this all runs fine, as one would expect:
    before
    within
    after
    Next I checked neo-runtime.xml to see if the settings had been augmented to switch this off by default: but I'm buggered if I can see any reference to it anywhere.
    So I then checked ColdFusion Administrator to see if there was any hint of it there, as this was one of the things Adobe said they were going to do in their solution to this. And there it is:
    So by default now, anything is allowed. I figured I must have missed the setting in neo-runtime.xml, so changed the setting to "FOOBAR" so I could easily spot it, and there it is down @ /wddxPacket/data/array/*[16]/var[@name="compileextforinclude"] in neo-runtime.xml:
    <var name="compileextforinclude">    <string>FOOBAR</string> </var>
    And - having changed it back to something sensible: CFM, then the feature now "works":
    before
    #message#
    after
    However this is probably a worse security hole than the one they were trying to fix! It looks OK when looking at the render in the browser, but look at the actual raw mark-up:
    before<br> <cfset message="within"> <cfoutput> #message#<br> </cfoutput> after<br>
    We have unparsed CFML source code sent to the browser. This is awful. What if someone switches this on, and doesn't spot one of their old includes which has less-than-trivial CFML in it? It's now publicly accessible. Adobe have created a feature which has the possibility to leak source code to the outside world. How is that a security feature?
    Also interesting is that with the super-secure profile installed, this is still off by default? I would have thought it'd be on in this case?
    I still don't think this feature has been implemented properly, and it all still points even more to the fact the Adobe ColdFusion bods don't really know what they're doing.
    Anyway, I'll nudge Adobe to at least get the docs sorted out.
    Time for work (3min ago)...
    Adam

    Hi Adam,
    Regarding "What if someone switches this on, and doesn't spot one of their old includes which has less-than-trivial CFML in it?", yeah I agree that'd be a problem.  Hmm, maybe both this.allowedextforinclude *and* this.compileextforinclude should've been supported (instead of replacing the former w/ the latter as was done)?  Example:
    this.compileextforinclude="cfm,cfml,inc";
    this.allowedextforinclude="cfm,cfml,inc,txt";
    That way an exception could be thrown if cf|included file's extension wasn't in the this.allowedextforinclude list.
    Perhaps the above could be shortened to:
    this.compileextforinclude="cfm,cfml,inc";
    this.allowedextforinclude="txt";//implicitly includes * from this.compileextforinclude (since -compile- implies -allowed-)
    Dunno if that'd be confusing.
    Anyhow, just some thoughts..
    Thanks!,
    -Aaron

  • Firefox has been crashing all the time after I updated to the newest version. I tried to uninstalled firefox and all addons. Restarted the computer to reinstall Firefox and it's still crashing all the time. Please help.

    Firefox has been crashing all the time after I updated to the newest version. I tried to uninstalled firefox and all addons. Restarted the computer to reinstall Firefox and it's still crashing all the time. Please help.

    https://support.mozilla.com/en-US/kb/Firefox%20crashes#w_get-help-fixing-this-crash
    Type '''about:crashes''' in the URL bar and hit Enter. <br />
    Click the hyperlinks to bring up the Crash Report pages and copy'n'paste the URL of each of those reports into the message box here. We'll see if we can help you figure out what is causing those crashes to happen.

  • A way to set a flag in java layer when native method has been called?

    Hi,
    I'm calling a native method from the java layer through to a native c function. Is there a way I can set a flag in the java layer when this native method has been called?
    Thanks!

    1. Create a wrapper method. The wrapper method is the only exposed method. It calls the native method. It sets the flag.
    2. Set the flag in the native method itself.
    3. You might be able to use the debugging API to do this however it is going to require quite a bit of work. And it injects itself at runtime.
    Is there a reason for this request? There might be other solutions if a general problem was posed.

  • There has been no signal in Springdale, UT for hours today. there is no way to contact Verizon (Calling or Web Chat). Service has been deteriorating for the past two years in the area. Worse fact is no one at the company seems to care. Right now the immed

    There has been no signal in Springdale, UT for hours today. there is no way to contact Verizon (Calling or Web Chat). Service has been deteriorating for the past two years in the area. Worse fact is no one at the company seems to care. Right now the immediate issue is no service. I cannot do business this way.

    You used the data.  Verizon can not see what it was sued for.  However your phone can see whats apps used the data.  go to settings-data usage- there will be a place that says data usage cycle.  line the dates up with your cycle.  then there will be a bar graph below that   extend bother white bars one all the way to the left and one all the way to the right.  after those are extended below that will be a list of apps,  there should be one that used over 2 gb and that will show you what app used that data in her purse

Maybe you are looking for

  • Mail Fails To Connect In My Office Network, Works on Reboot

    This is baffling me and my network admin: Mail fails to connect to any of my accounts at work. But it recovers if I reboot my machine. Here is what happens: - Mail works just fine at home. Connects to gmail, iCloud, and a 3rd party email account no p

  • How can I return my masseges

    I Set up my phone all my message gon

  • Help interpreting  v$rowcache_parent output

    Hi, what saddr = 00 means in that output : SQL> select count(*) , saddr from v$rowcache_parent group by saddr order by 1 desc;   COUNT(*) SADDR     413532 00          2 00000001DF739E88DB is RAC 10.2.0.3 . Regards. Greg

  • Another Apple ID question

    I have an older iPad which was setup using an Apple ID which is a deactivated/discontinued email address.  I have a new Apple ID and would like to switch the iPad over.  Trouble is I can no longer receive mail at that old address and I am unable to a

  • Ipad app purchase

    how can I cancel a subscription purchased on my ipad?