>----- Oorspronkelijk bericht ----- >Van: Glen Mazza [mailto:[EMAIL PROTECTED] > >Andreas L Delmelle wrote: > >> In the latter case, however: >> >> <fo:instream-foreign-object> >> <svg:svg ...> >> ... >> </svg:svg> >> </fo:instream-foreign-object> >> >> Note that the i-f-o now contains two text nodes (= #PCDATA): >> '
  ' and ' ' >> > >I think they call that "insignificant white space", and that would not >be counted as PCDATA.
OK, my mistake. What I meant was that, from the SAX parser's POV, this 'insignificant white space' is reported as 'characters', just like any other text. For all FOs that can contain #PCDATA, the characters() event is caught and all received characters are passed up. For any other FO the characters() event is simply ignored. > >Whitespace verifies as #PCDATA if #PCDATA is allowed at a particular >point. If #PCDATA is NOT allowed at a particular point, the whitespace >is ignored for the purposes of verifying. So we are currently handling it correct for XML whitespace. Now, we could catch those characters() events anyway, and test all individual chars to see if they are classified as whitespace in XML, and if not, throw a little warning... Then again, I'm thinking: if a non-whitespace character ends up there, this is either intentional --the user expects it to appear in the output, which is an error-- or inadvertently --a typo in the stylesheet. Since the first scenario is not a very common mistake, I'm having difficulty in judging whether it would make sense to bother the majority of users with a warning for a situation that has no effect on the output anyway... Those users that make the not-so-common mistake of explicitly putting text-nodes in an i-f-o may scratch their heads for a few seconds when that text 'disappears', then decide to post their FO to fop-users, where we'll gladly refer them to this discussion. :-) WDYT? Cheers, Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
