BookmarkSubscribeRSS Feed
SusanParker
Calcite | Level 5

Will v1.5 include the Schema Instance namespace in define.xml?  I keep getting this error in OpenCDISC validator.

I'm also wondering if there is somewhere, besides editing my define.xml, to provide the namespace information for v1.4.  I don't know java and it looks like that is what is writing the xml.

I have one other question.  For the SASFormatName attribute on codelists, values like $LBTESTCD are showing up as errors in the validator.  Is that really the case?  Was that a valid format name in v5 (assuming its some sort of transport file limitation that is the basis for the rule)?  I worked on v5.18 on a VAX when I first started using SAS and I can't remember for sure.

Thanks!

2 REPLIES 2
Lex_SAS
SAS Employee

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

SusanParker
Calcite | Level 5

Thanks Lex!  Now I just have to convince others that will run the validator on my define that DD0002 is too restrictive.  Looking forward to your PharmaSUG talk even though we only back-handedly use ODM through define.  Definitely am using the information from last year's talk.  Looking forward to v1.5 and then to define 2.0 support.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

Discussion stats
  • 2 replies
  • 1137 views
  • 0 likes
  • 2 in conversation