I need to write a XML file which should conform to a schema. The schema enforces datatype of the element (happens to be process id on Linux) to be an integer.
This fragment of the code passed the validation-
<pid datatype="int">123</pid>
However, I won’t know “123” or the process id beforehand, as such, I want to write something like this-
<pid datatype="int">*</pid>
Obviously this doesn’t work as * is seen as string as opposed to integer.
My question is – is there a way I can enter a value in XML file which will pass the test?
EDIT- here is the schema-
http://oval.mitre.org/language/version5.10/ovaldefinition/documentation/unix-definitions-schema.html#process58_object
After going through the schema definition, pid can either be empty or can contain a numeric value. So there if there is no data to be passed in then just specify it as
<pid datatype="int"></pid>or<pid />