Pages: « 1 2 3 4 5 6 7 8 9 10 »
 on: May 03, 2018, 02:51:55 PM 
Started by Marvin - Last post by Marvin
Thank you.

We'd like to "validate" more complex logic (beyond pure validation against a DTD), such as all rows having the same number of cells etc.
We already have a custom DTD set up (so rules checking etc. is very helpful) and validation works, but sometimes tables cause problems for our PDF generator because the numbers of cells do not match etc.
We'd like to be able to detect that in XMetaL Author, long before the problems reach the PDF generator, so end users can fix the issues themselves.
Once it reaches the PDF generator, it creates a support case for us.
Thank you.

 on: May 03, 2018, 01:23:11 PM 
Started by Marvin - Last post by Derek Read
I'll see if we can have someone look at that Schematron. Most likely it is simply incompatible with the Schematron engine we are using or the XSLT2 parser it runs on. Adjusting the file may be possible.

We should clarify what you mean by "validation" before answering your next question. Schematron is a language that allows you to make assertions about the presence or absence of specific patterns (whether nodes are present or not) in XML. This is different from the standard XML validation rules.

XMetaL Author is a "validating XML parser" and implements the standard validation rules according to the W3C's XML Recommendation. This feature is "live" at all times.

The best way to validate any XML document in XMetaL Author is to simply open the XML file. As long as it references a DTD or W3C Schema (aka: schema) the XML file will be validated immediately after the schema has been loaded. The same is true when you save -- validation is performed before the file is written out. You can also force validation to run at any time by selecting Validate from the Tools menu.

While editing an XML file another (proprietary) feature related to validation is engaged that we call "Rules Checking". This feature attempts to keep the document valid by not letting you put it into an invalid state when using the Element List, Attribute Inspector, via paste, etc. What this means is that if you start editing a valid document XMetaL will keep that document valid no matter what changes you make to it until you save.*

You can read more about the Validation and Rules Checking features in the help topic "Validation and rules checking".

* Note that this is not entirely true (though it is 99% of the time). XMetaL Author allows you to put a document into an invalid state in order to let you get to another valid state. One example is when an element must contain one (and only one) of multiple child elements and it already contains one of them. If you wish to insert a different child element XMetaL Author allows you to remove the existing child (putting the document into an invalid state) so you can insert one of the other allowed children. The majority of the cases will be similar, with XMetaL Author allowing you to delete things from a document putting it into a state where a required node might be missing. This is where validation comes in and that is why it is performed at file open and at file save.

 on: May 03, 2018, 07:38:58 AM 
Started by Marvin - Last post by Marvin
I would like to programmatically validate CALS tables in XMetaL Author 13.

I have found the following schematron:

But when I try to run the validation using Tools->Validate using Schematron, I receive the following error message:

SEVERE: Exception in invokeTransform: (TypeError) description: Object doesn't support property or method 'hasAttribute' number: -2146827850: Object doesn't support property or method 'hasAttribute'

Unexpected exception occured = Unable to get property 'xml' of undefined or null reference

Is this a problem with my XMetaL Author installation, or with that specific script?
Also, how can I call that validation programmatically?

Alternatively, is there a better way to validate CALS tables?

(Finally a quick bug report:
When you open Tools->Validate using Schematron and then choose "Select new Schematron file..." and click "Cancel" in the file open dialog, you can no longer open the file dialog, unless you either restart XMetaL or choose an existing Schematron file from the dropdown menu (i.e. if there is none you have to restart XMetaL Author). This is because the file dialog seems to be bound to an "selected item changed" event, but you cannot select the "Choose Schematron for validation" option, which is the only other option when there are now recent Schematron files in the list.)

 on: May 02, 2018, 03:58:49 PM 
Started by Marvin - Last post by Marvin
I'm sorry, my question was poorly worded.

We'd like the setting to be applied for many clients at the same time (at least when XMetaL Author is installed).
We already package macros and other customizations with the application, so it'd be great if we could just put this in some configuration file/macro/registry setting and then deploy that with the other files.

Sorry about the misunderstanding.

 on: May 02, 2018, 01:25:38 PM 
Started by Marvin - Last post by Derek Read
Look in the help under "Checking your spelling" then "Language settings".
That topic shows how to set the default spell checking language. In your case you will need to select "English-UK".

 on: May 02, 2018, 07:20:38 AM 
Started by Marvin - Last post by Marvin
All (or at least almost all) of our documents are in English and need to conform to Oxford (UK) English spelling.

As far as I know, we don't have any xml:lang tags in our documents.

Is there a way to set the default spellchecking language to UK English?

I found this thread, but I'm not sure if it's what I need.

What I want, is basically two things:

1. If no language is selected/detected, always fall back to "UK English".
2. If English is detected, always use the UK spelling (not US).

It would probably even be good enough to "hardwire" UK English spellchecking into the installation if that's easier.

Is there a setting we can adjust? Or would we have to use a macro?

Thank you.

 on: May 01, 2018, 03:17:18 PM 
Started by Marvin - Last post by Marvin
Thank you.

I could solve the problem, by replacing rng.pasteString with rng.InsertElement.

 on: May 01, 2018, 03:00:09 PM 
Started by Marvin - Last post by Marvin

 on: May 01, 2018, 02:59:00 PM 
Started by Marvin - Last post by Derek Read
If you aren't using XMetaL Developer you can still use Ctrl+Alt+R to reload macros.

This only helps for macros in events that can still run (ie: some events only fire at startup).

 on: May 01, 2018, 01:31:39 PM 
Started by Derek Read - Last post by Derek Read
This topic has been moved to DITA and XMetaL Discussion.

Pages: « 1 2 3 4 5 6 7 8 9 10 »