Validation in CSS.

Post here questions and problems related to editing and publishing DITA content.
Raga Mounika
Posts: 49
Joined: Mon Mar 28, 2016 3:54 pm

Validation in CSS.

Post by Raga Mounika »

Hi,

I have a doubt whether we can perform validation in CSS or not?
For example:
In a table in scale attribute if user is entering 50%(it is wrong).Can we inform user that entered data is wrong?
Please help me in solving this issue.

Thanks and Regards,
Mounika
alex_jitianu
Posts: 1016
Joined: Wed Nov 16, 2005 11:11 am

Re: Validation in CSS.

Post by alex_jitianu »

Hi Mounika,

The CSS controls only the layout and formatting of the author mode. The validation is performed against the schema associated with the document. The default schema behind DITA (in most cases a DTD) already restricts the possible values for @scale ( "50" is a valid value but "50%" is not). As soon as the user inserts a bad value the automatic validation in Oxygen will report an error.

Besides the validation against the default schema, you can use Schematron to write additional business rules as well as providing quick fixes to them. Once you write such business rules (for example a rule that verifies the value of @scale), all you have to do is to add the file to the validation scenario from the DITA framework. Afterwards, the automatic validation will apply these additional rules too.

Best regards,
Alex
Post Reply