Re: [xsl] Source code formatting

Subject: Re: [xsl] Source code formatting
From: "Willem Van Lishout willemvanlishout@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 30 Jul 2020 11:53:19 -0000
Attribute-value normalization seems to replace the CR with a space, so I
think that is expected behavior.

Willem Van Lishout
willemvanlishout@xxxxxxxxx



On Thu, Jul 30, 2020 at 1:44 PM Mukul Gandhi gandhi.mukul@xxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> 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
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3166594> (by
> email <>)

Current Thread