document is not properly loading without xml declaration

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
shikhar_472
Posts: 99
Joined: Fri Jul 01, 2022 12:08 pm

document is not properly loading without xml declaration

Post by shikhar_472 »

Hi Team,
We are not able to load the XMl document properly if xml tag declaration is missing
<?xml version="1.0" encoding="UTF-8"?>

is there any way to work on xml document in a proper way in which this declration is missing because we have 2.5 millions of data in database where xml tag declaration is missing updating all of them manually to load in oxygen is critical so is there any chance that oxygen can accept and work properly on XML document without xml tag.

Thanks,
Shikhar.
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: document is not properly loading without xml declaration

Post by Radu »

Hi Shikhar,
Oxygen should be able to properly load XML files even without the xml encoding declaration present.
Could you tell me more details about what error you receive in Oxygen when attempting to load such files?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
shikhar_472
Posts: 99
Joined: Fri Jul 01, 2022 12:08 pm

Re: document is not properly loading without xml declaration

Post by shikhar_472 »

Hi Radu,

Stylesheet is not loading properly and toolbar is also not opening

and in logs i am getting

file:/C:/DevTools/oxygen-xml-web-author/tomcat/webapps/oxygen-xml-web-author/WEB-INF/lib/oxygen-patched-xerces.jar
2023-06-02 13:14:13,017 DEBUG [ Thread-7 ] ro.sync.net.protocol.http.WebdavHttpURLConnection - Disconnecting
2023-06-02 13:14:13,017 DEBUG [ Thread-7 ] com.oxygenxml.examples.webdav.WebdavUrlInfo - java.io.IOException: Error parsing server response
java.io.IOException: Error parsing server response
at com.oxygenxml.examples.webdav.WebdavUrlInfo.getResourceType(WebdavUrlInfo.java:205)
at com.oxygenxml.examples.webdav.WebdavUrlInfo.access$100(WebdavUrlInfo.java:39)
at com.oxygenxml.examples.webdav.WebdavUrlInfo$1.run(WebdavUrlInfo.java:139)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:306)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
at com.oxygenxml.examples.webdav.WebdavUrlInfo.getResourceType(WebdavUrlInfo.java:203)
... 3 common frames omitted
shikhar_472
Posts: 99
Joined: Fri Jul 01, 2022 12:08 pm

Re: document is not properly loading without xml declaration

Post by shikhar_472 »

Hi Team,

Is there any update on this?
cristi_talau
Posts: 495
Joined: Thu Sep 04, 2014 4:22 pm

Re: document is not properly loading without xml declaration

Post by cristi_talau »

Hello,
This error message means that the response sent by your WebDAV server to a PROPFIND request is not well-formed XML. Here is the corresponding code: https://github.com/oxygenxml/web-author ... .java#L203

Best,
Cristian
shikhar_472
Posts: 99
Joined: Fri Jul 01, 2022 12:08 pm

Re: document is not properly loading without xml declaration

Post by shikhar_472 »

cssload.PNG
cssload.PNG (19.76 KiB) Viewed 962 times
Hi Team,

Please check this image i am not able to load css properties file even in console there is no error.
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: document is not properly loading without xml declaration

Post by mihaela »

Hello,

So, to better understand your case, have you solved the error regarding the not well-formed response sent by your WebDAV server to a PROPFIND request?
The "cannot load the CSS" error appears only when the document does not include the XML declaration? Or it happens in both cases?
If you open the "Report Problem" dialog ("More..." menu/"Report Problem..." action) what is the name of the current document type listed in the "General info" tab? It is the document type that you expect?

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
shikhar_472
Posts: 99
Joined: Fri Jul 01, 2022 12:08 pm

Re: document is not properly loading without xml declaration

Post by shikhar_472 »

Hi Mehula,

Same error i am facing when i am trying to open the docuement in Oxygen Editor desktop based application
Without doing any call to webdav server could you please check that i am attaching the screenshot.
webeditorPNG.PNG
webeditorPNG.PNG (38.93 KiB) Viewed 929 times
Attachments
webeditorPNG.PNG
webeditorPNG.PNG (38.93 KiB) Viewed 929 times
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: document is not properly loading without xml declaration

Post by mihaela »

Hello,

This error means that your document is not associated with a document type. You have to check again the association rules from your custom framework.

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Post Reply