The XML schema for the define.xml does not allow the SASFormatName attribute to be longer than 8. You could use "$LBTESTC" as alternative.
As far as the Schema instance namespace:
CST v1.5 does not create the Schema Instance namespace in define.xml.
The SAS Clinical Standards Toolkit follows the recommendation from the XML Schema Validation for define.xml White Paper (http://www.cdisc.org/define-xml).
This paper states:
Many tools enable you to link the schema to the define.xml file at validation time, and this method is generally considered to be a robust option for referencing the schema. This approach is often preferred because the consuming application is typically better suited to establishing the location of your local schema repository.
Another approach is to set the value of the xsi:schemaLocation attribute within the define.xml file itself. This attribute value allows you to tie the define.xml document to the define-1-0-0.xsd schema. This link is not mandatory, but with many validators it does help the tool to locate the schema. The W3C Schema Recommendation considers the xsi:schemaLocation value as a hint to the validating software on where to find the schema.
In general, validation tools will use a handful of possible strategies to identify and locate the define.xml schema for validation purposes:
- Use the xsi:schemaLocation attribute value to find the schema. Not all tools will make use of this hint.
- Enable the user to set the location of the schema within the validating software at the time of validation processing.
- The validating software may dereference the namespace to retrieve the schema.
- Use logic built-in to the application to determine the location of the define schema.
Not all XML parsers employ these strategies in the same way. For example Xerxces, a broadly used XML parser maintained by the Apache Software Foundation uses the information in xsi:schemaLocation to locate the define.xml schema. On the other hand, the MSXML 4.0 parser does not.
Since CST does not use the xsi:schemaLocation, it does not define the xsi namespace, since this namespace is not being used in the define.xml as created by CST.
We consider the OpenCDISC rule DD0002 (DD0002 Missing or invalid namespace reference) too restrictive, since the schema namespace reference only has to be there in case it is used.
In the Define-XML version 2 this rule is more clearly defined. There it is clearly stated that the schema location is optional, and that the schema instance namespace is only required when the schema location is provided.
I hope this helps.
Best,
Lex Jansen
Software Developer @ SAS