Forums: Define.xml
I see 2 problems here:
1. You try to create 2 different displays but define those 2 different displays in the XML and not in the stylesheet. XML is not about display. The stylesheet takes care of the display.
2. The definition of the CodeListOID is: a reference to the CodeList definition. By changing the definition to "the list of CodeListItem values", you violate the ODM standard. It is an error that CodeListOID does not have a value of a corresponding CodeList OID. This is not depending on the fact whether the PhaseForward tool is complaining or not.
You could just have a link to the CodeList in the HTML rendering of the CT column, and depending on your stylesheet it would display either the CodeListOID or the CodeListItem values.
Hope this helps.
Lex Jansen
Disclaimer: these posts represent my own opinion and not necessarily those of my employer (SAS).
This is one of those "we have to be able to do things in different ways because we're a CRO" questions.
In variable and value-level tables, we allow two forms of codelist display – one is the name of a codelist (the XSL builds a hyperlink to the codelist and displays the link in the CT column). The other way is to display the codelist without a hyperlink, something like:
Y, N, U
or
1=White
2=Black
in the variable’s CT column.
In the first (hyperlinked) case, I create define.xml like:
<CodeListRef CodeListOID="#app3$ACN”
In the second case, I’d create:
<CodeListRef CodeListOID="Y, N, U”
In the XSL, if I find codelist OID $ACN, the CT table cell will contain a hyperlink to $ACN. If the OID value doesn’t match a codelist OID, like in the other examples, I just insert the text as-is (knowing that that OID doesn’t actually exist). The problem with the second approach is, of course, that you flag the enumerated lists’ OIDs:
OD0048 Referenced 'CodeList' not found
The PhaseForward validation tool never complained about this – my reaction until now was “thanks for not complaining.” Now, though, we want to use OpenCDISC for both define.xml and XPT file validation. So I’m wondering – how can we have this mix of CT hyperlinks and in-table lists of values? Having only hyperlinks to codelists or enumerated lists is not an option, because some clients like to see the list in the table itself, without having to use a hyperlink (for the record, that’s my “old-school” preference as well).
Until now, I’ve just used CodeListOID to make the two display options possible. But if I can’t use it to store the Y, N, U and other lists (or values like ISO 8601, for that matter), where can they be stored? I suppose it’s possible to overload Comment, then parse it with XSL, but that would create reasonable-looking HTML at the cost of essentially inaccurate or misleading Comment values in the XML. So what I’m asking here is: am I missing something in ODM? Is there a cleaner way to store the lists? (schema extension, perhaps?)