FIXML 4.3 -- valid attribute enumerations of CDATA?

Imported from previous forum

I have a question on whether a particular aspect of the FIXML 4.3 DTD is really valid.

There are various attributes similar in form to those for the LastMkt element below:

<!ATTLIST LastMkt FIXTag CDATA #FIXED '30’
DataType CDATA #FIXED 'Exchange’
Value (%isoMICCode; ) #REQUIRED >

What concerns me is the "Value" attribute. The isoMICCode entity expands to "CDATA", thus producing

<!ATTLIST LastMkt FIXTag CDATA #FIXED '30’
DataType CDATA #FIXED 'Exchange’
Value (CDATA ) #REQUIRED >

I cannot find anything in the XML standard to indicate that "(CDATA)" is a valid enumeration. Different validating XML parsers seem to treat this differently – XMLSpy seems OK with it, but XercesC 1.6.0 rejects it.

Can anyone provide a definitive answer as to whether the above is valid?

I can guess the indent of a "(CDATA)" enumeration type but this seems indistinguishable from a legal (and, at least to me, less confusing and less ambiguous) plain old "CDATA" attribute type.

Kind Regards,
–MikeL

Mike:

If what you are trying to do is create an attribute "Value" which can only
assume the "CDATA" value, then the DTD is valid.
One of our engineers has tried a simple test using this dtd and our product, Stylus Studio:

<!ENTITY % isoMICCode “CDATA”>
<!ATTLIST LastMkt FIXTag CDATA #FIXED '30’
DataType CDATA #FIXED 'Exchange’
Value (%isoMICCode; ) #REQUIRED >
<!ELEMENT LastMkt EMPTY>

…and this XML document…
<!DOCTYPE LastMkt SYSTEM "y:\test.dtd">
<LastMkt Value="CDATA"/>

…and it validates fine using Stylus Studio 4.0 beta (using Xerces 1.7), and also
using Stylus Studio 3.1 (Xerces 1.6 + fixes).

To aid the FIXML community I have arranged with my company to offer free productive use copy of Stylus Studio 3.0 for anyone using FIXML.

Download Stylus Studio at www.exln.com. You will need to enter the promotional code “fixstyle” to qualify for the full use version. If you enter any other code you’ll get a 30-day eval.

http://www.exln.com
Download Stylus Studio
Enter &quot;fixstyle&quot; to get FULL USE VERSION
Enjoy!

Marketing Pitch for our XML Database, XIS:

eXcelon’s eXtensible Information Server (XIS) is a robust and mature XML database management system.

XIS is the best choice for mission-critical and durable XML-based applications. XIS has been successfully deployed for over 3 years, augmenting existing infrastructure, relational databases, and legacy systems to support new business initiatives. XIS solutions have a proven track record of supporting continued growth and change while simultaneously reducing cycle times and overall costs of building real-world applications.

Jon Bachman
eXcelon Corporation
VP Product Management, XML Tools
jbachman@exln.com
direct: 781.402.7241
mobile: 781.956-9986

> I have a question on whether a particular aspect of the FIXML 4.3 DTD is really valid.
>
> There are various attributes similar in form to those for the LastMkt element below:
>
> <!ATTLIST LastMkt FIXTag CDATA #FIXED ‘30’
> DataType CDATA #FIXED ‘Exchange’
> Value (%isoMICCode; ) #REQUIRED >
>
> What concerns me is the “Value” attribute. The isoMICCode entity expands to “CDATA”, thus producing
>
> <!ATTLIST LastMkt FIXTag CDATA #FIXED ‘30’
> DataType CDATA #FIXED ‘Exchange’
> Value (CDATA ) #REQUIRED >
>
> I cannot find anything in the XML standard to indicate that “(CDATA)” is a valid enumeration. Different validating XML parsers seem to treat this differently – XMLSpy seems OK with it, but XercesC 1.6.0 rejects it.
>
> Can anyone provide a definitive answer as to whether the above is valid?
>
> I can guess the indent of a “(CDATA)” enumeration type but this seems indistinguishable from a legal (and, at least to me, less confusing and less ambiguous) plain old “CDATA” attribute type.
>
> Kind Regards,
> --MikeL
>
>

I’m afraid my original posting wasn’t clear. What I’m really interested in finding out is whether the following represents a valid LastMkt element:

<LastMkt Value="XLIF"/>

as I believe it is the indention of FIXML 4.3 that LastMkt’s Value attribute be allowed to contain any valid ISO 10383 Market Identifier Code (MIC). If my interpretation is correct, and if the above example is NOT valid, then this seems to indicate that FIXML 4.3 is not correct.

I am not interested in whether a particular XML parser considers the above to be valid/invalid. The question is: Should all XML parsers consider the above valid, or should they all consider it invalid? If the former, can anyone point to the relevent portions of the XML specification in support of their claim?

Kind regards,
–MikeL

> If what you are trying to do is create an attribute “Value” which can only
> assume the “CDATA” value, then the DTD is valid.
> One of our engineers has tried a simple test using this dtd and our product, Stylus Studio:
>
> <!ENTITY % isoMICCode “CDATA”>
> <!ATTLIST LastMkt FIXTag CDATA #FIXED ‘30’
> DataType CDATA #FIXED ‘Exchange’
> Value (%isoMICCode; ) #REQUIRED >
> <!ELEMENT LastMkt EMPTY>
>
> …and this XML document…
> <!DOCTYPE LastMkt SYSTEM “y:\test.dtd”>
> <LastMkt Value=“CDATA”/>
>
> …and it validates fine using Stylus Studio 4.0 beta (using Xerces 1.7), and also
> using Stylus Studio 3.1 (Xerces 1.6 + fixes).

[ original email was from John Goeller - jgoeller@lehman.com ]
It is really a design decision.

Previous versions of the DTD had some fairly long lists of enumerations embedded in the DTD. For example, we had an entity which contained all of the possible values for markets called exchanges.

<!ENTITY % exchanges "AL|A|AM|…"

We decided that it didn’t make sense to have a huge list of enumerations in the DTD which would probably need to be valididated via a database lookup anyway. This is consistent with the approach many DTD designers have taken.

In an XML implementation, not all of the validation would necessarily be done by the XML parser anyway.

CDATA attributes are strings where any text is allowed so your example would be valid. All XML parsers should consider this valid.

Here’s a tutorial with an example that is similar:
http://www.javacommerce.com/tutorial/xmlj/attribut.htm

> I’m afraid my original posting wasn’t clear. What I’m really interested in finding out is whether the following represents a valid LastMkt element:
>
> <LastMkt Value=“XLIF”/>
>
> as I believe it is the indention of FIXML 4.3 that LastMkt’s Value attribute be allowed to contain any valid ISO 10383 Market Identifier Code (MIC). If my interpretation is correct, and if the above example is NOT valid, then this seems to indicate that FIXML 4.3 is not correct.
>
> I am not interested in whether a particular XML parser considers the above to be valid/invalid. The question is: Should all XML parsers consider the above valid, or should they all consider it invalid? If the former, can anyone point to the relevent portions of the XML specification in support of their claim?
>
> Kind regards,
> --MikeL
>
> > If what you are trying to do is create an attribute “Value” which can only
> > assume the “CDATA” value, then the DTD is valid.
> > One of our engineers has tried a simple test using this dtd and our product, Stylus Studio:
> >
> > <!ENTITY % isoMICCode “CDATA”>
> > <!ATTLIST LastMkt FIXTag CDATA #FIXED ‘30’
> > DataType CDATA #FIXED ‘Exchange’
> > Value (%isoMICCode; ) #REQUIRED >
> > <!ELEMENT LastMkt EMPTY>
> >
> > …and this XML document…
> > <!DOCTYPE LastMkt SYSTEM “y:\test.dtd”>
> > <LastMkt Value=“CDATA”/>
> >
> > …and it validates fine using Stylus Studio 4.0 beta (using Xerces 1.7), and also
> > using Stylus Studio 3.1 (Xerces 1.6 + fixes).
>
>