Warning about validation when loading framework files

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
Johann
Posts: 144
Joined: Wed Jun 17, 2015 12:46 pm

Warning about validation when loading framework files

Post by Johann »

Hello,

I am using Author web 24.1.0.0 version.

When my custom framework files are loaded, I got multiple warnings in the console.
ro.sync.options.n - Invalid field : validationSchema for class ro.sync.exml.editor.validate.ValidationUnit. ro.sync.options.InvalidPersistentObjException: Schema URI must be specified
I exported the validationScenarios from Oxygen Editor so I do not see what is wrong.

Code: Select all

<field name="validationScenarios">
	<validationScenario-array>
		<validationScenario>
			<field name="pairs">
				<list>
					<validationUnit>
						<field name="validationType">
							<validationUnitType>
								<field name="validationInputType">
									<String>text/xml</String>
								</field>
							</validationUnitType>
						</field>
						<field name="url">
							<String>${currentFileURL}</String>
						</field>
						<field name="validationEngine">
							<validationEngine>
								<field name="engineType">
									<String>Xerces</String>
								</field>
								<field name="allowsAutomaticValidation">
									<Boolean>true</Boolean>
								</field>
							</validationEngine>
						</field>
						<field name="allowAutomaticValidation">
							<Boolean>true</Boolean>
						</field>
						<field name="validationSchema">
							<validationUnitSchema>
								<field name="dtdSchemaPublicID">
									<String>-//MYPUBLICID</String>
								</field>
								<field name="type">
									<Integer>1</Integer>
								</field>
							</validationUnitSchema>
						</field>
					</validationUnit>
					<validationUnit>
						<field name="validationType">
							<validationUnitType>
								<field name="validationInputType">
									<String>text/xml</String>
								</field>
							</validationUnitType>
						</field>
						<field name="url">
							<String>${currentFileURL}</String>
						</field>
						<field name="validationEngine">
							<validationEngine>
								<field name="engineType">
									<String>&lt;Default engine></String>
								</field>
								<field name="allowsAutomaticValidation">
									<Boolean>true</Boolean>
								</field>
							</validationEngine>
						</field>
						<field name="allowAutomaticValidation">
							<Boolean>true</Boolean>
						</field>
						<field name="extensions">
							<null/>
						</field>
						<field name="validationSchema">
							<validationUnitSchema>
								<field name="dtdSchemaPublicID">
									<null/>
								</field>
								<field name="schematronPhase">
									<null/>
								</field>
								<field name="type">
									<Integer>7</Integer>
								</field>
								<field name="uri">
									<String>${framework}/schemas/schematron/href-attribute-rules.sch</String>
								</field>
							</validationUnitSchema>
						</field>
					</validationUnit>
				</list>
			</field>
			<field name="type">
				<String>Validation_scenario</String>
			</field>
			<field name="name">
				<String>My validation scenario</String>
			</field>
		</validationScenario>
	</validationScenario-array>
</field>

Can you help me with that ?

Thank you,

Johann
mihaela
Posts: 297
Joined: Wed May 20, 2009 2:40 pm

Re: Warning about validation when loading framework files

Post by mihaela »

Hello,

This warning is related to the "uri" field from the validationUnitSchema and it is presented when the uri cannot be resolved.
Can you please check if the provided location points to an existing schema (${framework}/schemas/schematron/href-attribute-rules.sch)?

Code: Select all

<field name="uri">
    <String>${framework}/schemas/schematron/href-attribute-rules.sch</String>
</field>
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Johann
Posts: 144
Joined: Wed Jun 17, 2015 12:46 pm

Re: Warning about validation when loading framework files

Post by Johann »

Hello,

yes, the schema exists and I can see that the validation for this schema works well.

That's why I do not understand the WARNING.

Regards,

Johann
mihaela
Posts: 297
Joined: Wed May 20, 2009 2:40 pm

Re: Warning about validation when loading framework files

Post by mihaela »

Hello,

Thank you for your response.
We checked again and the warning appears because the following validation unit schema does not specify a "uri" field:

Code: Select all

<field name="validationSchema">
    <validationUnitSchema>
        <field name="dtdSchemaPublicID">
            <String>-//MYPUBLICID</String>
        </field>
        <field name="type">
            <Integer>1</Integer>
        </field>
    </validationUnitSchema>
</field>
This serialization means that you have a validation scenario that uses a custom DTD schema (not detected schema) that does not specify the schema URL. How did you set up the validation configuration? Did you manually modified the .framework file or did you used the UI from the Oxygen XML Editor?

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Johann
Posts: 144
Joined: Wed Jun 17, 2015 12:46 pm

Re: Warning about validation when loading framework files

Post by Johann »

Hello,

You are right.
This part is not necessary:

Code: Select all

<field name="validationSchema">
    <validationUnitSchema>
        <field name="dtdSchemaPublicID">
            <String>-//MYPUBLICID</String>
        </field>
        <field name="type">
            <Integer>1</Integer>
        </field>
    </validationUnitSchema>
</field>
because I used:

Code: Select all

<field name="allowAutomaticValidation">
    <Boolean>true</Boolean>
</field>
If I remove it, no more WARNINGS.

This code is quite old with us. It was certainly originally generated using the GUI of an old version of oxygen editor.

Thank you for your help,

Johann
mihaela
Posts: 297
Joined: Wed May 20, 2009 2:40 pm

Re: Warning about validation when loading framework files

Post by mihaela »

Hello,

We are glad that the problem is solved.
Please let us know if you encounter any other problem.

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Post Reply