Page 1 of 1
Validation in CSS.
Posted: Thu Aug 11, 2016 12:00 pm
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
Re: Validation in CSS.
Posted: Thu Aug 11, 2016 4:32 pm
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