Hi, I do have a xml file using the xml:lang attribute: <Text> <Para xml:lang="en">this is some text</Para> </Text> The DTD for this file contained the following, which validates my XML file correctly: <!ELEMENT Text (Para+) > <!ELEMENT Para (#PCDATA) > <!ATTLIST Para xml:lang (en | de | ko) > Now I want to change my DTD in a XML Schema: ... <xsd:complexType name="ParaType" mixed="true"> <xsd:attribute name="xml:lang" default="en"> <xsd:simpleType> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="en"/> <xsd:enumeration value="de"/> <xsd:enumeration value="ko"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType>
... oops, that was sent too fast... here part 2: My xsv validator tells me that the Schema file is all right. But I do get an error message if I include the xsd in my xml file: 'unexpected attribute xml:lang in <Para> (the Tag wherein I use the ParaType) - Is my approach converting xml:lang from DTD to XML Schema wrong? - Where can I find some resources about how to use xml:lang in conjunction with XML Schema? - Should I omit the xml:lang in my XML file and rather use a common attribute... Thanks for a little help... Bye Berny
Hi Berny, follow the link, http://www.xfront.com/xml-schema.html and download the tutorial, unzip it. Check the slide no. 80 of xml-schemas2.ppt under the .....\xml-schemas\xml-course\xml-schemas directory. I hope it'll give you a little help. Bye