Next in thread → Next in month →

Re: [xml-dev] Forming a MIME_TYPE Attribute list

From
Bob Foster <>
To
, "K. Ari Krupnikov" <>
Date
2003-06-06T00:27:58Z
ID
<121901c32bc2$7c746b00$1401a8c0@snobird>
Thread
Re: [xml-dev] Forming a MIME_TYPE Attribute list
From: "K. Ari Krupnikov" <>
> "Marker, Mike" <> writes:
>
> > The following does not work:
> >
> > <!ATTLIST MIME_TYPE value (text/html | application/pdf | image/tiff)
> > "image/tiff">
> >
> > due to the '/' characters.
>
> Correct. Enumerated attribute values are NMTOKENs and as such can only
> include name characters. "/" is not a name character.

You can use an XML Schema or RELAX NG simple type with a base type of
xs:token and enumeration facets.

(To ease the transition to a schema, if it's an issue, you can use Jame's
Clark's trang, http://www.thaiopensource.com/relaxng/trang.html, which does
a bang-up job converting DTDs to several flavors of schema.)

Bob

> Ari.
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
>
>
Next in thread → Next in month →