Page 1 of 1

Validation block whole UI

Posted: Fri Sep 05, 2008 1:16 pm
by vladdu
Hi!
Why isn't the validation done in the background? With a large document the UI is blocked for a long while...
best regards,
Vlad

Re: Validation block whole UI

Posted: Fri Sep 05, 2008 4:53 pm
by sorin_ristache
Hello,

In Oxygen standalone the validation is done in the background. Do you run the Oxygen Eclipse plugin? In Eclipse the validation action started from the Eclipse toolbar button may block the Eclipse UI if the schema(s) needed for validation cannot be loaded quickly, for example the network connection to the schema is slow or cannot be established because a proxy server was not configured correctly from menu Window / Preferences / General / Network Connections.

Can you post a sample XML document for reproducing the problem? What is the schema used for validating it?


Regards,
Sorin

Re: Validation block whole UI

Posted: Fri Sep 05, 2008 9:36 pm
by vladdu
Hi,

Yes, it's the Eclipse plugin I am using and it's a Docbook 4 document.
I noticed that Docbook 5 is much faster.

Isn't the schema cached?

regards,
Vlad

Re: Validation block whole UI

Posted: Mon Sep 08, 2008 12:41 pm
by sorin_ristache
Hello,

If you started your document from one of the predefined DocBook document templates available in the New dialog (menu File -> New or the New toolbar button) then your DocBook XML document is matched by a DocBook predefined document type based on the root element name or the Public ID of the document (DocBook 4) or based on the namespace of the root element name (DocBook 5) and Oxygen uses a local schema located in [Eclipse-install-folder]/plugins/com.oxygenxml.editor_9.3.0/frameworks/docbook. That means very fast access to the schema used for validation and content completion of XML elements and attributes. If your document cannot be matched by a DocBook document type you have the option of adding an XML catalog to the list available from Window / Preferences / oXygen / XML / XML Catalog so that a local schema is used instead of reading the schema from a remote server.

Can you post the beginning of your document to see how Oxygen reads the schema for validation and content completion (the com.oxygenxml.editor_9.3.0/frameworks folder or a remote server)?


Regards,
Sorin

Re: Validation block whole UI

Posted: Mon Sep 08, 2008 12:45 pm
by vladdu
Hi,

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
Maybe it was checking it online?

Thanks for the help!
/Vlad

Re: Validation block whole UI

Posted: Mon Sep 08, 2008 2:31 pm
by sorin_ristache
Yes, in your case Oxygen checked the document against the Docbook DTD at http://www.oasis-open.org/docbook/xml/4 ... cbookx.dtd because you refer to an old version of the DTD, tat is older than version 4.2 of the Docbook DTD. Oxygen maps the reference to the Docbook DTD to a local copy through the predefined XML catalog of the Docbook document type and thus uses a local copy of the DTD instead of reading the DTD from the http://www.oasis-open.org website only if you refer to the DTD of Docbook 4.2 or later (versions 4.2, 4.3, 4.4, 5.0).


Regards,
Sorin

Re: Validation block whole UI

Posted: Mon Sep 08, 2008 2:38 pm
by vladdu
That explains it.

Thank you!

/Vlad