Subject: Re: [xsl] Source code formatting From: "Mukul Gandhi gandhi.mukul@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 30 Jul 2020 11:43:46 -0000 |
On Thu, Jul 30, 2020 at 4:00 PM Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > I'd really appreciate if xerces had an option to deactivate attribute > normalization that can be set by a Saxon configuration option or a > command line switch. I don't know how responsive/welcoming the Apache > XML maintainers are if someone of us submitted a patch, in particular if > it's a patch that enables non-standard behaviour. Attribute value normalization, it seems, has a certain behaviour (it seems to override the attribute value normalization definition as defined within the XML spec) when doing XML Schema (XSD) validation. Please consider the following XSD 1.1 validation example, XML document <?xml version="1.0"?> <X att_1="v "/> (the attribute value is character v followed by an enter key. i.e, the unnormalized attribute value string length is 2) XSD 1.1 document <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="X"> <xs:complexType> <xs:attribute name="att_1" type="xs:string"/> <xs:assert test="string-length(@att_1) = 2"/> </xs:complexType> </xs:element> </xs:schema> When doing the above XSD validation, the validation passes (with both Xerces & Saxon. The <assert>, <xs:assert test="string-length(@att_1) = 1"/> makes the XML document invalid). I think that, above XSD validation can be explained by following section of XSD 1.1 data types spec: https://www.w3.org/TR/xmlschema11-2/#rf-whiteSpace (the spec says, 'for string the value of whiteSpace is preserve'). -- Regards, Mukul Gandhi
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Source code formatting, Dave Pawson dave.paw | Thread | Re: [xsl] Source code formatting, Willem Van Lishout w |
Re: [xsl] Source code formatting, Dave Pawson dave.paw | Date | Re: [xsl] Source code formatting, Willem Van Lishout w |
Month |