On 3/11/25 13:48, Roman Danyliw wrote: > -----Original Message----- > From: Brotman, Alex <[email protected]> > > <xs:element name="human_result" type="xs:string" > minOccurs="0" maxOccurs="1"> > <xs:attribute name="lang" type="xs:lang" default="EN"/> > </xs:element> > > Is that what folks are looking for? If so, I'll upload another revision with > that updated in the two places it exists. > > [Roman] I can't speak for the WG, but that looks good to me.
Except that it does not work, the XSD does not validate. "human_result" is not the only element with human language text in it. There is "comment" in policy override reason, and in the report metadata section, "error" and maybe even "extra_contact_info" could be argued to be for human consumption and in need of a "lang" attribute. Also the prose part should be updated with a note for the affected elements. | * "<element>" support an optional "lang" attribute | to indicate the language of its contents. | The default value is "en". It's possible to define a "lang" attribute, but should we? From: https://www.w3.org/2001/xml.xsd lang (as an attribute name) [...] This name is reserved by virtue of its definition in the XML specification. Here we define it to behave as the lang attribute, so maybe it's OK. The minimum workable solution for the XSD that I found, was to add a type with support for the "lang" attribute, and use it for the affected elements: <xs:complexType name="langAttrString"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="lang" type="xs:language" use="optional" default="en"/> </xs:extension> </xs:simpleContent> </xs:complexType> I can make the changes and send pull requests, but please give some guidance on which extra elements should get the treatment, if any, or if we should backtrack on adding the "lang" attribute at all. Daniel K. _______________________________________________ dmarc mailing list -- [email protected] To unsubscribe send an email to [email protected]
