<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>4888</bug_id>
          
          <creation_ts>2007-07-27 19:32:06 +0000</creation_ts>
          <short_desc>Clarify text striping and consolidation of white space characters for nested xml:space</short_desc>
          <delta_ts>2007-08-06 09:32:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>SVG</product>
          <component>Text</component>
          <version>All Specifications</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Errata</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>dtc-w3</reporter>
          <assigned_to name="Doug Schepers">schepers</assigned_to>
          <cc>www-svg</cc>
          
          <qa_contact name="Doug Schepers">schepers</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>15947</commentid>
    <comment_count>0</comment_count>
    <who name="">dtc-w3</who>
    <bug_when>2007-07-27 19:32:06 +0000</bug_when>
    <thetext>Could the SVG specification clarify the handling of white space characters when
there are nested text elements that differ in their xml:space attribute.

When xml:space is &apos;default&apos; the SVG specification requires the application to
&apos;strip off all leading and trailing space characters&apos;, but also requires the
application to preserve leading and trailing white space characters when
xml:space is &apos;preserve&apos;.  But what is expected when there are leading and trailing
white space characters defined in a mixture of elements with xml:space of &apos;preserve&apos;
and &apos;default&apos;?

When xml:space is &apos;default&apos; the SVG specification requires the application to
&apos;all contiguous space characters will be consolidated&apos;, but also requires the
application to preserve white space characters when xml:space is &apos;preserve&apos;.
But what is expected when there are white space characters to consolidate that
are defined in a mixture of elements with xml:space of &apos;preserve&apos; and &apos;default&apos;?

Suggested clarification:
When stripping leading and trailing white space characters, or consolidating white
space characters, white space characters defined within a element with xml:space
of &quot;preserve&quot; are not stripped or consolidated and they are recognized as white space
characters for the purpose of stripping and consolidation and do not prevent the
stripping or consolidation of adjacent white space characters defined in elements
with xml:space=&quot;default&quot;.

Example:
Let &apos;P&apos; represent a white space character defined in an element with xml:space of &apos;preserve&apos;.
Let &apos;D&apos; represent a white space character defined in an element with xml:space of &apos;default&apos;.
Let &apos;T&apos; represent non-space text characters.

Given the string &quot;DPDPDTDDTPTDPTPDTDPDTPDPTDPDPD&quot; the application will strip and consolidate
the white space characters to give the string: &quot;PPTDTPTPTPTPTPPTPP&quot;

The current practice of SVG viewers appears to be to preserve white space characters defined
within a xml:space=&quot;preserve&quot; element even when mixed with adjacent whitespace characters
defined in elements with xml:space=&quot;default&quot;.  However the handling of white space characters
defined in elements with xml:space=&quot;default&quot; varies widely when mixed with adjacent whitespace
characters defined in elements with xml:space=&quot;preserve&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15948</commentid>
    <comment_count>1</comment_count>
      <attachid>480</attachid>
    <who name="">dtc-w3</who>
    <bug_when>2007-07-27 19:36:05 +0000</bug_when>
    <thetext>Created attachment 480
Text case.

A test for some of the cases.  This test gives different results
in a range of SVG browsers: Batik, Adobe SVG, Inkscape, Opera.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16064</commentid>
    <comment_count>2</comment_count>
    <who name="Doug Schepers">schepers</who>
    <bug_when>2007-08-06 09:28:03 +0000</bug_when>
    <thetext>Hi, Douglas-

We discussed this in the SVG WG, and we agree with both your characterization of the issue and with your proposed clarification.  We will tweak the wording, find the places in the spec that need to be changed, and get back to you soon to make sure you agree that we&apos;ve addressed your issue to your satisfaction.

We will add this to the errata for SVG 1.1, and make sure that the same changes are carried over into SVG 1.2.

Thanks for pointing out this issue.  It was very helpful, and will make the spec better.  

Regards-
-Doug Schepers
W3C Staff Contact, SVG, CDF, and WebAPI



</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>480</attachid>
            <date>2007-07-27 19:36:05 +0000</date>
            <delta_ts>2007-07-27 19:36:05 +0000</delta_ts>
            <desc>Text case.</desc>
            <filename>text-nested-ws-01.svg</filename>
            <type>image/svg+xml</type>
            <size>2827</size>
            <attacher>dtc-w3</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJM
SUMgIi0vL1czQy8vRFREIFNWRyAxLjEgQmFzaWMvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3Jh
cGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEtYmFzaWMuZHRkIj4KPCEtLT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0tLT4K
PCEtLT0gIENvcHlyaWdodCAyMDAwIFdvcmxkIFdpZGUgV2ViIENvbnNvcnRpdW0sIChNYXNzYWNo
dXNldHRzICAgICAgICAgID0tLT4KPCEtLT0gIEluc3RpdHV0ZSBvZiBUZWNobm9sb2d5LCBJbnN0
aXR1dCBOYXRpb25hbCBkZSBSZWNoZXJjaGUgZW4gICAgICAgID0tLT4KPCEtLT0gIEluZm9ybWF0
aXF1ZSBldCBlbiBBdXRvbWF0aXF1ZSwgS2VpbyBVbml2ZXJzaXR5KS4gQWxsIFJpZ2h0cyAgICAg
ID0tLT4KPCEtLT0gIFJlc2VydmVkLiBTZWUgaHR0cDovL3d3dy53My5vcmcvQ29uc29ydGl1bS9M
ZWdhbC8uICAgICAgICAgICAgICAgID0tLT4KPCEtLT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0tLT4KPCEtLSA9PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT0tLT4KPCEtLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLT4KPCEtLSBUZXN0IHByb3BlcnRpZXMgJ2xl
dHRlci1zcGFjaW5nJyBhbmQgJ3dvcmQtc3BhY2luZycgICAgICAgICAgICAgICAgICAtLT4KPCEt
LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAtLT4KPCEtLSBBdXRob3IgOiBEb3VnbGFzIENyb3NoZXIgMjUtSnVuZS0y
MDA3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLT4KPCEtLT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0t
LT4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGJhc2VQcm9maWxlPSJiYXNpYyIKICAgICB4bWxucz0iaHR0
cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgICAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMu
b3JnLzE5OTkveGxpbmsiCiAgICAgaWQ9InN2Zy1yb290IgogICAgIHdpZHRoPSIxMDAlIiBoZWln
aHQ9IjEwMCUiCiAgICAgdmlld0JveD0iMCAwIDEzMCA2MCI+Cgk8dGl0bGUgaWQ9InRlc3QtdGl0
bGUiPnRleHQtbmVzdGVkLXdzLTAxLnN2ZzwvdGl0bGU+Cgk8ZGVzYyBpZD0idGVzdC1kZXNjIj5U
ZXN0IHRoZSBuZXN0ZWQgeG1sOnNwYWNlIHByb3BlcnR5IGFuZCB3aGl0ZSBzcGFjZSBzdHJpcGlu
ZyBhbmQgY29hb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