c Craig
on

 

Hi,

I have a define.xml which looks correct however when passing through the validator I cam getting the two following messages

 

DD0001: Element 'MetaDataVersion' cannot have character [children], because the type's content type is element-only.
Details: Line number 7810
Define Code: </MetaDataVersion>                                                          << this line numbr 7810

 

DD0007: Invalid content was found starting with element 'ItemGroupDef'.
Details: Line number 202,
Define Code: 
    <ItemGroupDef OID="IG.DM"
    Domain="DM"
    Name="DM"
    Repeating="No"
    IsReferenceData="No"
    SASDatasetName="DM"
    Purpose="Tabulation"
    def:Structure="One record per subject"
    def:Class="SPECIAL PURPOSE"
    def:ArchiveLocationID="LF.DM">                                       << this is line 202

 

I have already seen this post about the first message https://www.pinnacle21.com/forum/pinnacle-21-v21-error-dd0001 which makes me think I need to validate the XML Schema in order to see the exact position. Now I am a total novice at doing this and looking at the Define 2.0 schema there are multiple XSD files. Can anyone help me?

I have attached the define in question.

Attached Files

Forums: Define.xml

j Jozef
on March 29, 2017

Hi Craig,
I cannot see your attached define.xml file, otherwise I could do the schema validation and find out where the error exactly is within 1-2 minutes. You can easily find my mail address and mail it to me if you want. I am one of the XML-Schema developers of define.xml 2.0 so for me it should be "piece of cake".
You can also easily do XML-Schema validation using a simple XML-Editor. There are several on the market, starting from about 100-150$ for a perpetual license. In the editor, load your define.xml file and click the "validate" button. It will ask you where you have the XML-Schema. Navigate to the schema\cdisc-define-2.0\define2-0-0.xsd file and select that. The XML-Schema validation will start and show you where the error occurs.
The error you have is typical for the case that you have one or more characters somewhere before or after a tag start or end. In your case this might be just before line 202. For example:
<ItemGroupDef OID="..." Name="...>...</ItemGroupDef>
a<ItemGroupDef OID="..." Name="...>...</ItemGroupDef>

With best regards,

Jozef

c Craig
on March 29, 2017

Thank you Jozef for your help.

Error DD0001 implies I have a typo somewhere in my define.xml code (as Jozef pointed out) and I am currently searching for said typo.
Typo turned out to be after a few of my </Itemdef> lines I had a random " (quotation mark). Once removed the code was perfect. (Thanks Jozef).

Error DD0007 was due to the ordering of my XML as pointed out by Jozef, the XML code should follow this order: 

def:AnnotatedCRF element
def:SupplementalDoc element(s)
def:ValueListDef element(s)
def:WhereClauseDef element(s)
ItemGroupDef element(s)
ItemDef element(s)
CodeList element(s)
MethodDef element(s)
def:CommentDef element(s)
def:leaf element(s)

I hope this can help someone in the future.

Want a demo?

Let’s Talk.

We're eager to share and ready to listen.

Cookie Policy

Pinnacle 21 uses cookies to make our site easier for you to use. By continuing to use this website, you agree to our use of cookies. For more info visit our Privacy Policy.