"Document could not be loaded" error in Web Author Test Server Add-on

Oxygen general issues.
chchrcr
Posts: 5
Joined: Wed Jun 07, 2017 8:58 pm

"Document could not be loaded" error in Web Author Test Server Add-on

Post by chchrcr »

I'm getting this error for documents with a DTD from a custom DITA framework. When I open the Web Author server add-on URL in a browser, the Web Author screen shows:

Document could not be loaded
[Download file]
Details:
The file does not appear to have a supported document format.

However, the document does validate with the custom DTD in Author, and the custom framework CSS is clearly working in Author as well.

A different document with a standard DITA DTD reference works in the add-on.

Any suggestions?
cristi_talau
Posts: 489
Joined: Thu Sep 04, 2014 4:22 pm

Re: "Document could not be loaded" error in Web Author Test Server Add-on

Post by cristi_talau »

Hello,

It seems that the Web Author Test Server Add-on is not picking up your framework. One limitation of the add-on that comes to mind is that it cannot load frameworks with "internal" storage [1].

In order to find more details about the error you can open the browser developer tools (by pressing F12 in Chrome), go to the Navigation tab and look for a failed request to an URL like:

Code: Select all

http://localhost:8080/oxygen-webapp/rest/v19.0.0/doc/load/
The response may contain an additional error message. If this message does not look informative, you can try to send us the framework and a sample file so that we will be able to reproduce the problem. You can send these files over our support email address.

Best,
Cristian

[1] https://www.oxygenxml.com/doc/versions/ ... ialog.html
chchrcr
Posts: 5
Joined: Wed Jun 07, 2017 8:58 pm

Re: "Document could not be loaded" error in Web Author Test Server Add-on

Post by chchrcr »

Here are the details of the error message:

Code: Select all

http://127.0.0.1:8080/oxygen-webapp/rest/v19.0.0/doc/load/file%253A%252FUsers%252Fchadcrume%252FDropbox%252Fwork%252FBARBRI%252FBABR%252Fcontent%252520models%252FBABR%252520test%252520Open%252520Answer.dita?userName=chadcrume
Failed to load resource: the server responded with a status of 500 (Internal Server Error)

workspace-v19.0.0.js:3722 RESTException
htmlResponse: "A '(' character or an element type is required in the declaration of element type "lcQuestionBase2"."
req: REST.RequeststatusCode: 500
type: "error"
__proto__: Object
"Message: Not available<br>Url: <a href="view-source:http://127.0.0.1:8080/oxygen-webapp/app/oxygen.html?url=file%3A%2FUsers%2Fc…uthor=chadcrume&showSave=true&stylesheet-titles=Basic,BARBRI%20CSS" target="_new">http://127.0.0.1:8080/oxygen-webapp/app/oxygen.html?url=file%3A%2FUsers%2Fc…uthor=chadcrume&showSave=true&stylesheet-titles=Basic,BARBRI%20CSS</a><br>Line: Not available<br><br>Browser stack:<br>Not available-> [end]<br><br>JS stack traversal:<br>Error<br> &#160; &#160;at Object.goog.debug.exposeExceptionAsHtml (http://127.0.0.1:8080/oxygen-webapp/app/workspace-v19.0.0.js:691:486)<br> &#160; &#160;at Object.goog.debug.exposeException (http://127.0.0.1:8080/oxygen-webapp/app/workspace-v19.0.0.js:690:351)<br> &#160; &#160;at sync.view.JQMProblemReporter.sync.view.ProblemReporter.reportLoadingProblem (http://127.0.0.1:8080/oxygen-webapp/app/workspace-v19.0.0.js:3722:97)<br> &#160; &#160;at sync.Editor.<anonymous> (http://127.0.0.1:8080/oxygen-webapp/app/workspace-v19.0.0.js:3551:349)<br> &#160; &#160;at d.onRejected (http://127.0.0.1:8080/oxygen-webapp/app/workspace-v19.0.0.js:585:261)<br> &#160; &#160;at Function.goog.Promise.invokeCallback_ (http://127.0.0.1:8080/oxygen-webapp/app/workspace-v19.0.0.js:593:138)<br> &#160; &#160;at goog.Promise.executeCallback_ (http://127.0.0.1:8080/oxygen-webapp/app/workspace-v19.0.0.js:592:193)<br> &#160; &#160;at goog.Promise.executeCallbacks_ (http://127.0.0.1:8080/oxygen-webapp/app/workspace-v19.0.0.js:591:140)<br> &#160; &#160;at goog.async.run.processWorkQueue (http://127.0.0.1:8080/oxygen-webapp/app/workspace-v19.0.0.js:571:102)<br> &#160; &#160;at <anonymous>-> " undefined
I assume the lcQuestionBase2 element definition is coming from the learningInteractionBase2Domain.mod in our framework, which is a version from DITA 1.3 March 2014 added into our DITA 1.2 customization. Here's the content of that file for reference:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY % div.cnt
"#PCDATA |
%basic.block; |
%basic.ph; |
%data.elements.incl; |
%foreign.unknown.incl; |
%txt.incl;"
>
<!-- ============================================================= -->
<!-- HEADER -->
<!-- ============================================================= -->
<!-- MODULE: DITA Learning Interaction Base 2 Domain -->
<!-- VERSION: 1.3 -->
<!-- DATE: March 2014 -->
<!-- -->
<!-- ============================================================= -->
<!-- ============================================================= -->
<!-- PUBLIC DOCUMENT TYPE DEFINITION -->
<!-- TYPICAL INVOCATION -->
<!-- -->
<!-- Refer to this file by the following public identfier or an -->
<!-- appropriate system identifier -->
<!-- PUBLIC "-//OASIS//ELEMENTS DITA Learning Interaction Base 2 Domain//EN" -->
<!-- ============================================================= -->
<!-- SYSTEM: Darwin Information Typing Architecture (DITA) -->
<!-- -->
<!-- PURPOSE: Declaring the elements and specialization -->
<!-- attributes for Learning Domain -->
<!-- -->
<!-- ORIGINAL CREATION DATE: -->
<!-- March 2014 -->
<!-- -->
<!-- (C) Copyright OASIS Open 2014. -->
<!-- All Rights Reserved. -->
<!-- -->
<!-- ============================================================= -->
<!-- -->

<!-- ============================================================= -->
<!-- ELEMENT NAME ENTITIES -->
<!-- ============================================================= -->

<!ENTITY % lcInteractionBase2
"lcInteractionBase2" >
<!ENTITY % lcInteractionLabel2
"lcInteractionLabel2" >
<!ENTITY % lcQuestionBase2
"lcQuestionBase2" >

<!-- ============================================================= -->
<!-- ELEMENT DECLARATIONS -->
<!-- ============================================================= -->

<!ENTITY % lcInteractionBase2.attributes
"id
NMTOKEN
#REQUIRED
%conref-atts;
%select-atts;
%localization-atts;
outputclass
CDATA
#IMPLIED"
>
<!-- LONG NAME: Learning interaction base 2 -->
<!ENTITY % lcInteractionBase2.content
"((%lcInteractionLabel2;)?,
(%lcQuestionBase2;),
(%basic.block; |
%basic.ph; |
%data.elements.incl; |
%foreign.unknown.incl; |
%txt.incl;)*)"
>
<!ENTITY % lcInteractionBase2.attributes
"id
NMTOKEN
#REQUIRED
%conref-atts;
%select-atts;
%localization-atts;
outputclass
CDATA
#IMPLIED"
>
<!ELEMENT lcInteractionBase2 %lcInteractionBase2.content;>
<!ATTLIST lcInteractionBase2 %lcInteractionBase2.attributes;>


<!ENTITY % lcInteractionLabel2.attributes
"%univ-atts;
outputclass
CDATA
#IMPLIED"
>
<!-- LONG NAME: Learning interaction question base -->
<!ENTITY % lcInteractionLabel2.content
"(%title.cnt;)*"
>
<!ENTITY % lcInteractionLabel2.attributes
"%univ-atts;
outputclass
CDATA
#IMPLIED"
>
<!ELEMENT lcInteractionLabel2 %lcInteractionLabel2.content;>
<!ATTLIST lcInteractionLabel2 %lcInteractionLabel2.attributes;>

<!ENTITY % div.cnt
"#PCDATA |
%basic.block; |
%basic.ph; |
%data.elements.incl; |
%foreign.unknown.incl; |
%txt.incl;"
>


<!ENTITY % lcQuestionBase2.attributes
"%univ-atts;
outputclass
CDATA
#IMPLIED"
>
<!-- LONG NAME: Learning interaction question base 2 -->
<!ENTITY % lcQuestionBase2.content
"(%div.cnt;)*"
>
<!ENTITY % lcQuestionBase2.attributes
"%univ-atts;
outputclass
CDATA
#IMPLIED"
>
<!ELEMENT lcQuestionBase2 %lcQuestionBase2.content;>
<!ATTLIST lcQuestionBase2 %lcQuestionBase2.attributes;>



<!-- ============================================================= -->
<!-- SPECIALIZATION ATTRIBUTE DECLARATIONS -->
<!-- ============================================================= -->

<!ATTLIST lcInteractionBase2 %global-atts; class CDATA "+ topic/div learningInteractionBase2-d/lcInteractionBase2 ">
<!ATTLIST lcInteractionLabel2 %global-atts; class CDATA "+ topic/p learningInteractionBase2-d/lcInteractionLabel2 ">
<!ATTLIST lcQuestionBase2 %global-atts; class CDATA "+ topic/div learningInteractionBase2-d/lcQuestionBase2 ">

<!-- ================== DITA Learning Interaction Base 2 Domain ==================== -->
Thanks!
cristi_talau
Posts: 489
Joined: Thu Sep 04, 2014 4:22 pm

Re: "Document could not be loaded" error in Web Author Test Server Add-on

Post by cristi_talau »

Hello,

We were not able to reproduce your problem, however it seems that Web Author Test Server Add-on has problems parsing your DTDs. Since the DTD parsing works in Oxygen XML Author, I guess that it loads a different set of DTDs.

The DITA DTDs that are loaded are configured in the DITA framework using editor variables. By default the catalogs are defined as follows:

Code: Select all

${framework}/catalog.xml
${configured.ditaot.dir.url}/catalog-dita.xml
${framework}/styleguide/catalog.xml
${framework}/plugin/catalog.xml
The second location depends on the selected DITA-OT directory configured in oXygen options. In Web Author this is configured to be the DITA-OT2.x folder from the DITA framework.

What I suggest you to do is to change the catalogs configured in your framework to hard-code the path of the DITA-OT folder instead of relying on the ${configured.ditaot.dir.url} editor variable. It would look like "${framework}/DITA-OT".

Note: this setting is needed only for the Web Author Test Server, in a production environment you can configure your own DITA-OT folder.

Also, it would help us to reproduce the problem if you could send the framework and a sample file at support@oxygenxml.com.

Best,
Cristian
chchrcr
Posts: 5
Joined: Wed Jun 07, 2017 8:58 pm

Re: "Document could not be loaded" error in Web Author Test Server Add-on

Post by chchrcr »

Thank you. Changing it to "${baseFramework}/DITA-OT/catalog-dita.xml" worked. Much appreciated.
Post Reply