Page 1 of 1

Author mode - quick visual XInclude check

Posted: Tue Sep 22, 2009 4:55 pm
by honyk
Hello,

I suppose if reffered content is loaded into the main document, its root element is known. It would be nice to display reffered content backgroung in different colour (now light grey by default) if it is to be placed in not allowed context according to DTD (very raw check of root element only).

With default engine and XIncludes allowed on document level (as provided in Oxygen templates) there is no validation of external content performed - there is only check if xi:include element is in allowed context, not refferenced content itself. There must be selected different engine LIBXML for this task, but it brings another problems.

With default engine validation any problem is very often discovered during generating of the output. I think proposed quick check could be very helpful not only for our workflow.

Jan

Re: Author mode - quick visual XInclude check

Posted: Tue Sep 22, 2009 5:45 pm
by sorin_ristache
Hello,

Why don't you use LIBXML for all validations? If the edited document includes some fragments with XInclude and is validated against a DTD (so you hit the limitation of validating each file separately before XInclude elements are resolved) why do you use the default validator? Did you try with a validation scenario that applies LIBXML (instead of the default validator) to the master file and that is associated with the master file and all the included files?


Regards,
Sorin

Re: Author mode - quick visual XInclude check

Posted: Wed Sep 23, 2009 11:34 am
by honyk
Hello,

default validator is used simply because of LIBXML shortage in some areas. Details were discussed here: http://www.oxygenxml.com/forum/topic4079.html and http://www.oxygenxml.com/forum/topic4123.html.
You have to create validation scenario. But this step is not sufficient for getting all IDs in the document or proper validation if target ID is not present in the same part where link to this ID is used.

To avoid this simplified olinks are used instead of links in our splitted documentation and documents are validated using default validator. Yes, it has drawback in loosing control on links (if they work or not) but why to make things more complicated with disputable improvement at the end?

Jan

Re: Author mode - quick visual XInclude check

Posted: Wed Sep 23, 2009 3:46 pm
by sorin_ristache
I posted a solution for using the features of both Xerces and LIBXML in the same validation scenario: values of IDREF attributes that are defined in other files listed in the content completion window for an ID attribute and validation of IDREF attribute values when the ID value if defined in other file. You can use the same solution in this case because LIBXML will report an error when the root element of an included file is not correct when inserted in the master document. You see such errors reported using the usual error reporting mechanism: red markers on the right side stripe of the editing area and a list of errors in the Errors view. Just ignore Xerces errors about unresolved IDREF attributes that point in fact to ID values defined in other fragment files.


Regards,
Sorin