Subject: [xml2rfc-dev] preserve space and artwork

From: Jim Schaad <[email-masked]>
Date: Mon, 26 Feb 2018 14:23:43 -0800

In writing some test cases I got a surprise because what I was planning to
use for detection of the need to deal with preserving spaces in artwork was
not there.  For the v2 grammar there was a default attribute of
xml:space="preserve" on the artwork element.  With the new RNG grammar this
is no longer the case.  I am unsure of how this would affect XSLT, but it
appears that I need to make sure that whitespace handling is done
differently based on the element name.

Is this expected behavior - that the program needs to know when to preserve
whitespace - or should there be something that will set the xml:space
attribute on the appropriate nodes?  Specifically is this a requirement of
document authors.

Jim

---

From: Julian Reschke <[email-masked]>
Date: Tue, 27 Feb 2018 07:38:32 +0100

> differently based on the element name.

Yes, and this really isn't a change. Even back in DTD times, a document 
would need to be processed correctly in absence of xml:space.

On the other hand, putting xml:space=preserve anywhere else never had an 
effect.

> ...

Best regards, Julian

---

From: Jim Schaad <[email-masked]>
Date: Tue, 27 Feb 2018 09:57:43 -0800

> -----Original Message-----
> From: Julian Reschke [mailto:[email-masked]]
> Sent: Monday, February 26, 2018 10:39 PM
> To: Jim Schaad <[email-masked]>; [email-masked]
> Subject: Re: [xml2rfc-dev] preserve space and artwork
> 
> > In writing some test cases I got a surprise because what I was
> > planning to use for detection of the need to deal with preserving
> > spaces in artwork was not there.  For the v2 grammar there was a
> > default attribute of xml:space="preserve" on the artwork element.
> > With the new RNG grammar this is no longer the case.  I am unsure of
> > how this would affect XSLT, but it appears that I need to make sure
> > that whitespace handling is done differently based on the element name.
> 
> Yes, and this really isn't a change. Even back in DTD times, a document would
> need to be processed correctly in absence of xml:space.

Yes, but in the DTD times, the DTD would provide that attribute so when I was comparing v2 to v3 documents it was working correctly.  It started failing when I was comparing v3 to v3 documents.  However I have patched my code.

Jim

---

From: Julian Reschke <[email-masked]>
Date: Tue, 27 Feb 2018 19:12:21 +0100

> Yes, but in the DTD times, the DTD would provide that attribute so when I was comparing v2 to v3 documents it was working correctly.  It started failing when I was comparing v3 to v3 documents.  Ho…

Even for v2, the DTD was truly optional. The processor just needs to 
know that <artwork> has different whitespace rules.

Best regards, Julian