import Testing @testable import PureXML /// A `block` on a LOCAL element declaration applies to that element by its instance /// (qualified) name. When the schema is unqualified (no elementFormDefault), the /// local element is in no namespace, so the block must be keyed there for an /// xsi:type substitution on it to be barred (W3C sun typeDef00801). @Suite("local element block keying") struct SchemaLocalElementBlockKeyTests { @Test("block on an unqualified local element bars an xsi:type extension") func test_unqualifiedLocalElementBlock() throws { let schema = try PureXML.Schema.Document(""" """) // Element is unqualified (no elementFormDefault): in instance it is in no namespace. let doc = #""# #expect(try !schema.validate(doc).isEmpty) } }