Blocked entity "%entity_file" whose target has a different protocol than the file where it was declared
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
Blocked entity "%entity_file" whose target has a different protocol than the file where it was declared
Hi Team,
I am unable to open xml with <!ENTITY > markup in web author. below is the error I got on load.
Sample XML File.
From oxygen logs also I could not find anything meaning full. please take a look at below log. hope this could be useful.
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.j - Detected indexes, psl 2, psc 1, el 3, ec 103
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.j - Before root <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xampex [
<!ENTITY % entity_file SYSTEM "http://localhost/jwblinks/schema/allchars-numeric.ent"> %entity_file;]>
<fakeRoot/>
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.j - Possible doctype <!DOCTYPE xampex [
<!ENTITY % entity_file SYSTEM "http://localhost/jwblinks/schema/allchars-numeric.ent"> %entity_file;]>
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.j - Extracted doctype <!DOCTYPE xampex [
<!ENTITY % entity_file SYSTEM "http://localhost/jwblinks/schema/allchars-numeric.ent"> %entity_file;]>
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.basic.xml.ProxyNamespaceMapping - Add proxy namespace mapping: '' - ''
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.catalogresolver.m - Resolve entity PUBLIC: null SYSTEM: http://localhost/jwblinks/schema/allchars-numeric.ent
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.catalogresolver.CatalogResolverFactory - resolver: ro.sync.xml.catalogresolver.f@4a24b65c
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.catalogresolver.f - Could not resolve PublicID: [null] SystemID: [http://localhost/jwblinks/schema/allchars-numeric.ent]
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.catalogresolver.m - resolved to: null
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.catalogresolver.CatalogResolverFactory - resolve with editor manager null
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.net.protocol.http.WebdavHttpURLConnection - Disconnecting
Please let know if I am missing something here while loading xml.
I am unable to open xml with <!ENTITY > markup in web author. below is the error I got on load.
From network log in developer toolbar load request returned http 400 with Json response "{"type": "io_error","message":"Blocked entity \"%entity_file\" whose target has a different protocol than the file where it was declared."}"Document could not be loaded
Details:
Blocked entity "%entity_file" whose target has a different protocol than the file where it was declared.
Sample XML File.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xampex [
<!ENTITY % entity_file SYSTEM "http://localhost/jwblinks/schema/allchars-numeric.ent"> %entity_file;]>
<xampex source="WDA.TDIPHOQ.C12.F2657.Z.O" xmlns="http://localhost/legal/xampex" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://localhost/legal/xampex http://localhost/legal/xampex/schema/xampex.tco.xsd">
<cs>WL TRIALORDER</cs>
<orgid>ARIZSUPER.C20153480.PIMA.002.LBLX055_TO.PDF</orgid>
<tndx>GUID-38:0147.If7080f30186a11e7924d9f2715c3d365</tndx>
<ct>McArthur v. Carondelet Health Network</ct>
<note>OCR, Chrisian Inc., F662657</note>
<lbl>Trial Order</lbl>
<lblx>LBLX055</lblx>
<st>AZ</st>
</xampex>
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.j - Detected indexes, psl 2, psc 1, el 3, ec 103
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.j - Before root <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xampex [
<!ENTITY % entity_file SYSTEM "http://localhost/jwblinks/schema/allchars-numeric.ent"> %entity_file;]>
<fakeRoot/>
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.j - Possible doctype <!DOCTYPE xampex [
<!ENTITY % entity_file SYSTEM "http://localhost/jwblinks/schema/allchars-numeric.ent"> %entity_file;]>
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.j - Extracted doctype <!DOCTYPE xampex [
<!ENTITY % entity_file SYSTEM "http://localhost/jwblinks/schema/allchars-numeric.ent"> %entity_file;]>
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.basic.xml.ProxyNamespaceMapping - Add proxy namespace mapping: '' - ''
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.catalogresolver.m - Resolve entity PUBLIC: null SYSTEM: http://localhost/jwblinks/schema/allchars-numeric.ent
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.catalogresolver.CatalogResolverFactory - resolver: ro.sync.xml.catalogresolver.f@4a24b65c
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.catalogresolver.f - Could not resolve PublicID: [null] SystemID: [http://localhost/jwblinks/schema/allchars-numeric.ent]
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.catalogresolver.m - resolved to: null
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.xml.catalogresolver.CatalogResolverFactory - resolve with editor manager null
2023-02-21 15:32:34,186 DEBUG [ http-nio-8205-exec-5 ] ro.sync.net.protocol.http.WebdavHttpURLConnection - Disconnecting
Please let know if I am missing something here while loading xml.
Re: Blocked entity "%entity_file" whose target has a different protocol than the file where it was declared
Hello,
There is an option called block.cross.protocol.system.entities [1] that, when it is set to true (the default), blocks the XML external entities if their target URL does not have the same protocol as the URL of the file where the entity is declared (from what I see in the logs your document is opened from a webdav server).
You can set the option to false [2] if you want to change this behavior.
[1] https://www.oxygenxml.com/doc/versions/ ... 2x_dzv_brb
[2] https://www.oxygenxml.com/doc/versions/ ... tions.html
Best Regards,
Mihaela
There is an option called block.cross.protocol.system.entities [1] that, when it is set to true (the default), blocks the XML external entities if their target URL does not have the same protocol as the URL of the file where the entity is declared (from what I see in the logs your document is opened from a webdav server).
You can set the option to false [2] if you want to change this behavior.
[1] https://www.oxygenxml.com/doc/versions/ ... 2x_dzv_brb
[2] https://www.oxygenxml.com/doc/versions/ ... tions.html
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service