Re: How can the mere switch from DTD to XSD in the source document affect how a stylesheet handles white space?
"Wolfhart Totschnig
[email protected]" <
[email protected]>
Tue, 23 Feb 2021 15:22:04 -0000
| Newsgroups |
gmane.text.xml.xsl.general.mulberrytech |
| Message-ID |
<[email protected]> |
Thank you, Martin, Michael, and Liam, for your replies! I understand now.
Best regards,
Wolfhart
On 22-02-21 19:33, Liam R. E. Quin [email protected] wrote:
> On Mon, 2021-02-22 at 20:55 +0000, Wolfhart Totschnig
> [email protected] wrote:
>> So this is a Saxon-specific issue?
> No. it's a difference between XSLT 1 and 2, and DTD-less vs. with a
> DTD. The _only_ whitespace that can officially be dropped by an XML
> parser is when a DTD is in use and the DYD says an elememt only has
> elmeent children, not #PCDATA. oher schemas, such as W3C XSD or
> RelaxNG, are processed _after_ the XML is parsed and such spaces have
> been (or not been) dropped based on the DTD.
>
> What is processor-dependent is ways to mitigate this when it's a
> difficulty.
>
> Note (there was another thread on this recently) that a language
> defined in XML can say that white-space in certain context is ignored,
> as happend when an XSLT stylesheet itself is read.
>
> Liam
>
>
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/3329386
or by email: [email protected]
--~--