[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Source code formatting

Subject: Re: Source code formatting
From: "Willem Van Lishout willemvanlishout@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 30 Jul 2020 11:53:19 -0000
Re:  Source code formatting
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.