B
Brett Gerhardi
Hi all, can anyone explain why the following isn't valid?
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:complexType name="ct1">
<xsd:attribute name="a1" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="ct2">
<xsd:complexContent>
<xsd:restriction base="ct1">
<xsd:attribute name="a1" fixed="bob"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
I would expect that adding a fixed value to the attribute would be
considered further restriction but this isn't what I want. I want to ensure
any extension of this type always has a value (and in some cases that value
will be fixed). How should I be doing this?
Thanks for any suggestions
-=- Brett
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:complexType name="ct1">
<xsd:attribute name="a1" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="ct2">
<xsd:complexContent>
<xsd:restriction base="ct1">
<xsd:attribute name="a1" fixed="bob"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
I would expect that adding a fixed value to the attribute would be
considered further restriction but this isn't what I want. I want to ensure
any extension of this type always has a value (and in some cases that value
will be fixed). How should I be doing this?
Thanks for any suggestions
-=- Brett