Can't use DTD without a "file:" while parsing with SAX2 parser

Hello,
I'm using JDK 1.4 with JAXP parser.
I'm trying to parse an xml document that use a dtd.
The DTD is in same dir as the xml file.
If i use a "file:./" before mydtd.dtd like this :
<!DOCTYPE doc SYSTEM "file:./mydtd.dtd">
It is working fine, but if i declare it as
<!DOCTYPE doc SYSTEM "mydtd.dtd">
I've got a parsing SAX exception saying
Relative URI "mydtd.dtd" can't be resolved without an URI of document. (translated)
How to fix that ?

I think your problem would be solved by using InputSource class. Use the setSystemId method. The relative URI will be resolved relative to the path you provide in this method.

Similar Messages

  • How can I use an old XMP file on a new set of images??

    I have an older XMP file that contains settings used to retouch some previous images in a particular way. I'd like to apply those same settings to a new set of images. How can I use that older XMP file on a new set of images in Lightroom?
    The contents of the XMP file are as follows:
    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2-c020 1.124078, Tue Sep 11 2007 23:21:40   
    ">
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
    xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/">
       <crs:Version>6.0</crs:Version>
       <crs:ProcessVersion>5.7</crs:ProcessVersion>
       <crs:WhiteBalance>Custom</crs:WhiteBalance>
       <crs:Temperature>4700</crs:Temperature>
       <crs:Tint>+4</crs:Tint>
       <crs:Exposure>-0.35</crs:Exposure>
       <crs:Shadows>5</crs:Shadows>
       <crs:Brightness>+50</crs:Brightness>
       <crs:Contrast>+25</crs:Contrast>
       <crs:Saturation>-8</crs:Saturation>
       <crs:Sharpness>25</crs:Sharpness>
       <crs:LuminanceSmoothing>0</crs:LuminanceSmoothing>
       <crs:ColorNoiseReduction>25</crs:ColorNoiseReduction>
       <crs:ChromaticAberrationR>0</crs:ChromaticAberrationR>
       <crs:ChromaticAberrationB>0</crs:ChromaticAberrationB>
       <crs:VignetteAmount>0</crs:VignetteAmount>
       <crs:ShadowTint>-1</crs:ShadowTint>
       <crs:RedHue>0</crs:RedHue>
       <crs:RedSaturation>0</crs:RedSaturation>
       <crs:GreenHue>0</crs:GreenHue>
       <crs:GreenSaturation>0</crs:GreenSaturation>
       <crs:BlueHue>0</crs:BlueHue>
       <crs:BlueSaturation>0</crs:BlueSaturation>
       <crs:FillLight>0</crs:FillLight>
       <crs:Vibrance>+5</crs:Vibrance>
       <crs:HighlightRecovery>24</crs:HighlightRecovery>
       <crs:Clarity>+8</crs:Clarity>
       <crs:Defringe>0</crs:Defringe>
       <crs:HueAdjustmentRed>0</crs:HueAdjustmentRed>
       <crs:HueAdjustmentOrange>0</crs:HueAdjustmentOrange>
       <crs:HueAdjustmentYellow>0</crs:HueAdjustmentYellow>
       <crs:HueAdjustmentGreen>0</crs:HueAdjustmentGreen>
       <crs:HueAdjustmentAqua>0</crs:HueAdjustmentAqua>
       <crs:HueAdjustmentBlue>0</crs:HueAdjustmentBlue>
       <crs:HueAdjustmentPurple>0</crs:HueAdjustmentPurple>
       <crs:HueAdjustmentMagenta>0</crs:HueAdjustmentMagenta>
       <crs:SaturationAdjustmentRed>0</crs:SaturationAdjustmentRed>
       <crs:SaturationAdjustmentOrange>0</crs:SaturationAdjustmentOrange>
       <crs:SaturationAdjustmentYellow>0</crs:SaturationAdjustmentYellow>
       <crs:SaturationAdjustmentGreen>0</crs:SaturationAdjustmentGreen>
       <crs:SaturationAdjustmentAqua>0</crs:SaturationAdjustmentAqua>
       <crs:SaturationAdjustmentBlue>0</crs:SaturationAdjustmentBlue>
       <crs:SaturationAdjustmentPurple>0</crs:SaturationAdjustmentPurple>
       <crs:SaturationAdjustmentMagenta>0</crs:SaturationAdjustmentMagenta>
       <crs:LuminanceAdjustmentRed>0</crs:LuminanceAdjustmentRed>
       <crs:LuminanceAdjustmentOrange>0</crs:LuminanceAdjustmentOrange>
       <crs:LuminanceAdjustmentYellow>0</crs:LuminanceAdjustmentYellow>
       <crs:LuminanceAdjustmentGreen>0</crs:LuminanceAdjustmentGreen>
       <crs:LuminanceAdjustmentAqua>0</crs:LuminanceAdjustmentAqua>
       <crs:LuminanceAdjustmentBlue>0</crs:LuminanceAdjustmentBlue>
       <crs:LuminanceAdjustmentPurple>0</crs:LuminanceAdjustmentPurple>
       <crs:LuminanceAdjustmentMagenta>0</crs:LuminanceAdjustmentMagenta>
       <crs:SplitToningShadowHue>138</crs:SplitToningShadowHue>
       <crs:SplitToningShadowSaturation>13</crs:SplitToningShadowSaturation>
       <crs:SplitToningHighlightHue>0</crs:SplitToningHighlightHue>
       <crs:SplitToningHighlightSaturation>0</crs:SplitToningHighlightSaturation>
       <crs:SplitToningBalance>0</crs:SplitToningBalance>
       <crs:ParametricShadows>0</crs:ParametricShadows>
       <crs:ParametricDarks>0</crs:ParametricDarks>
       <crs:ParametricLights>0</crs:ParametricLights>
       <crs:ParametricHighlights>0</crs:ParametricHighlights>
       <crs:ParametricShadowSplit>25</crs:ParametricShadowSplit>
       <crs:ParametricMidtoneSplit>50</crs:ParametricMidtoneSplit>
       <crs:ParametricHighlightSplit>75</crs:ParametricHighlightSplit>
       <crs:SharpenRadius>+1.0</crs:SharpenRadius>
       <crs:SharpenDetail>25</crs:SharpenDetail>
       <crs:SharpenEdgeMasking>0</crs:SharpenEdgeMasking>
       <crs:PostCropVignetteAmount>0</crs:PostCropVignetteAmount>
       <crs:GrainAmount>0</crs:GrainAmount>
       <crs:ColorNoiseReductionDetail>50</crs:ColorNoiseReductionDetail>
       <crs:ConvertToGrayscale>False</crs:ConvertToGrayscale>
       <crs:ToneCurveName>Medium Contrast</crs:ToneCurveName>
       <crs:ToneCurve>
    <rdf:Seq>
    <rdf:li>0, 0</rdf:li>
    <rdf:li>32, 22</rdf:li>
    <rdf:li>64, 56</rdf:li>
    <rdf:li>128, 128</rdf:li>
    <rdf:li>192, 196</rdf:li>
    <rdf:li>255, 255</rdf:li>
    </rdf:Seq>
       </crs:ToneCurve>
       <crs:CameraProfile>Adobe Standard</crs:CameraProfile>
       <crs:CameraProfileDigest>3DA8CE4A626CE36A1D0C55BF157793C9</crs:CameraProfileDigest>
       <crs:HasSettings>True</crs:HasSettings>
      </rdf:Description>
    </rdf:RDF>
    </x:xmpmeta>

    I’m pretty sure Adobe NEVER intended for someone to copy an XMP file from one photo to another outside of LR as a way to replicate settings.   You can make a preset from a photo, as discussed, or if you don’t want to do that, copy-paste the settings from a representative photo that you initially select to one or more new photos.  You could have a special LR folder that holds standard photos to copy/paste from.  Of course creating a Develop preset from the representative photo is the “normal” way to handle such situations, but maybe you have hundreds of different situations to copy settings from and don’t want to create presets for each one, but I’d argue that you could create a complex folder hierarchy for your presets and still have them findable without that much problem.
    As far as the mystery about why some photos show Reset and some show From Metadata, is the Process Version (down in Camera Calibration) of the photo before reading the settings the same between the two situations?  And in general, are these virgin photos newly imported into LR or have some been modified in LR, already?  Does an XMP file already exist for any of these, where that XMP is being overwritten by your external-to-LR copying?  Or do you have auto-write-XMP enabled and your hand-copied XMP is getting overwritten by LR, automatically, before you have a chance to read in anything?

  • I am using earphones, but the external audio of my mini ipad is still on. How can I turn off the external audio while listening with my headset?

    I am using earphones, but the external audio of my mini ipad is still on. How can I turn off the external audio while listening with my headset/earphones?

    Other than iMovie, GB always incorporates the audio files into the GB package. So just save or move the GB project to the external drive, and you're done - anything you import, edit or record will be saved to the external drive.

  • Can i use keypad without cutting out speaker?

    When I need to use the keypad to input numbers while I'm in a call, the speaker cuts out. Sometimes it takes a few seconds for the sound to return, so I lose the answer, usually from an automated system. Other iPhone users say this should not happen. Any way I can fix this, or is the phone broken?

    SASPro wrote:
    Can I use MainStage without owning Logic?
    If you buy it from the AppStore, YES
    SASPro wrote:
    For a $29 download, does MainStage also come with all the content (sounds, etc.) for its built-in instruments, or is it assuming you already have those b/c you presumably own Logic?
    All the instrument and FX plugs are included, and a (massive) additional free download within the Mainstage application will get you all the extra content.
    SASPro wrote:
    This question may need its own separate thread, but: Ideally, my keyboard setups for a "concert" may need as many as five VSTs per song
    Caution: Logic/Mainstage will only work with Audio Unit (AU) plugins, NOT VST. Most 3rd party plugs are available as AU plugs, but you need to make sure you have installed them.
    SASPro wrote:
    Has anyone tested this more-complex and memory-taxing sort of a setup out in a live situation?
    Yes, and memory/CPU issues not withstanding, Mainstage generally works extremely well for this.
    CCT

  • Can I use indesign without being online

    can I use indesign without being online.

    Creative Cloud aplications are installed on and run from your computer. You must have an internet connection to activate, and CC will "phone home" periodically to verify that your subscription is valid, but otherwise no network connecton is required. If CC is unable to make a connection to verify subscription status you should still have 30 days grace period to work.
    As far as the file being too large, I'm not a Publisher user so I don't know haow it handles images, but the correct method in InDesign would be to Place the images which creates a link to the original of only a few bytes in the file, and it would not be unusual to have a document with hundreds of pages and hundreds of linked photos.

  • Can I use my Mac book pro while downloading a tv series from iTunes?

    Can I use my Mac book pro while downloading a long tv series from iTunes?  Or will I lose my connection ? And my money?

    I use my MacBook Pro all the time when downloading something from the iTunes store without losing my connection. If you would probably depends on the general stability of your WiFi or LAN connection, but you should not.
    Also, if a download should get interrupted you can always start it again by going to "Downloads" in iTunes.

  • Can I use my Us iPhone 5s in Europe with a prepaid sim card while on vacation?

    Can I use my Us iPhone 5s in Europe with a prepaid sim card while on vacation?

    Only if the device is unlocked. Not all US devices are unlocked, as you probably know.

  • I want to transfer files from a functioning hard drive in a nonfunctioning MacBook Pro to an external drive. I have an IDE/SATA drive adapter. The files won't fit on the drive for a working computer I have. Can I use it to transfer files to the external?

    I want to transfer files from a functioning hard drive in a nonfunctioning MacBook Pro to an external drive. I have an IDE/SATA drive adapter. The files won't fit on the drive for a working computer I have. Can I use it to transfer files to the external drive?

    Good luck and you are welcome.
    Like I said, I bought one of their inexpensive enclosures and now can use the hard drive just as a source for the files that are on it...my external drives are much larger and faster so I just plug that drive in when I need something from it.
    This one is on sale for $16 http://eshop.macsales.com/item/OWC/ES2.5BPU2S/

  • To test how can we use the opt  'logical file name' to name the file based

    Hi Sir/Madam,
               to test how can we use the opt  'logical file name' to name the file based on the selection made in the dtp run for extracting data as flat file.

    Hi Vishali,
    In the DTP select the file location as application server and give the logical file path. The actual file and logical path can be created using transaction "FILE" and "AL11".
    Rest of the process is same as that of extraction from local file.
    Regards,
    Durgesh.

  • How can i use RemoteObject without mxml?

      hi:
       in my flex project , i use blazeds + puremvc , so i want to put my business code in actionscript as proxy to communicate with java code, the proxy code like :
    public function requestServer(page:PageInfo):void{
       userServiceRM = new RemoteObject();
       userServiceRM.destination="userService";
       userServiceRM.getsimpleList();
       var pageResult :Object= userServiceRM.getsimpleList.lastResult;
       sendNotification(UserStartupCommond.USERLIST_GOT,pageResult );
    but i have a problem that pageResult is a  null value .(the Configuring and the server side have no problem .)
    how can i use RemoteObject without mxml?
     thanks.

    Hi. Remote object calls are asynchronous so you can't access the result immediately after making the call. You need to wait until the server returns the result. There are a couple ways to set this up. Probably the easiest thing to do is to add an event listener that will be called when the result comes back from the server. Here is what that would look like.
    public function requestServer(page:PageInfo):void {
    userServiceRM = new RemoteObject();
    userServiceRM.destination="userService";
    userServiceRM.addEventListener("result", resultHandler);
    userServiceRM.addEventListener("fault", faultHandler);
    userServiceRM.getsimpleList();
    public function resultHandler(event:ResultEvent) {
    var pageResult :Object= userServiceRM.getsimpleList.lastResult;
    sendNotification(UserStartupCommond.USERLIST_GOT,pageResult);
    public function faultHandler(event:FaultEvent) {
    //handle remote object fault
    Look at the RPC Components section of the BlazeDS Developers guide for more information about using the RPC components. Hope that helps.
    -Alex

  • HT204382 what can I use to view flv files on my Mac with Lion?

    What can I use to view flv files on my mac running lion? I have tried several free ones like VLC & they play 4-5 seconds & quit?

    http://perian.org allows playback of Flash formats via QuickTime Player.

  • Can i use store without payment cards?

    can i use store without payment cards?

    You can buy an iTunes gift card in most supermarkets.  Just register it in iTunes and you are good to go.

  • Is it manitory to have an airport antenna or can you use it without the antenna (powermac g5 dual processor 10.4.11)

    Is it manitory to have an airport antenna or can you use it without the antenna (powermac g5 dual processor 10.4.11)

    On the PowerMac G4 I had it had to be connected, but not sure about the model you have.  My guess would be yes due to shielding in the case, but would rather wait and hear from someone else.

  • Can I use JavaMail without Mailing Server??

    Dear All,
    My name is Jonathan Wong, a final year student.
    I am going to develop an internet application for my final year project that contains a part to sent e-mails by using JavaMail.
    Can I use JavaMail without setting up any Mail Server?? If no, can I use the ISP one?? Also, how can I retreive the mailing list from database to JavaMail?? Please advise.
    Thanks in advance.
    Best Wishes
    Jonathan

    You dont neend to set up a Mail server , You just have to connect to the desired mail server to send and retreive mails............. You should read the Javamail Api , you will find all the classes and required methods there ,, to retreive and send emails........

  • What application can you use to open a file with the .acc extension?

    What application can you use to open a file with the .acc extension?

    http://www.fileinfo.com/extension/acc

Maybe you are looking for

  • Firewire adapter to USB, correct one

    I'm still working on the old G4.  We do have in our parts bin a dvd/cdr writer player but it is USB.  What specs do I need to look for to use an adapter between the firewire and USB of the drive.   Walmart has several on their site but the specs are

  • How to recover songs that were deleted

    How do I recover songs that were deleted from itunes library and itunes acount and coputuer.

  • HT201303 i forgot the security answer! how can i get it back ?

    i forgot the security answer! how can i get it back ?

  • Can't I change the directory structure?

              Hello Everybody,           So far everything is working when use the default directory structure,i.e. mydomain/applications/myWebApp/WEB-INF/classes/some package structure.           But we have application with lot of html files which call

  • Query to get last N used partitions.

    Hi, I have a day based partitioned table TAB1. Let say for month Aug 2013 Partitons are like P010813,P020813,P030813 up to P310813. When gather stats job will run i want to analyze only the last 3 used partitions based on current date, this would be