<?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>17197</bug_id>
          
          <creation_ts>2012-05-25 21:12:48 +0000</creation_ts>
          <short_desc>svg style validating should not treat type as required attribute</short_desc>
          <delta_ts>2012-10-24 16:29:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML Checker</product>
          <component>General</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>xinyang_qiu</reporter>
          <assigned_to name="Michael[tm] Smith">mike+validator</assigned_to>
          <cc>mike</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68153</commentid>
    <comment_count>0</comment_count>
    <who name="">xinyang_qiu</who>
    <bug_when>2012-05-25 21:12:48 +0000</bug_when>
    <thetext>svg style validating should not treat type as required attribute

Validate the following:
&lt;!DOCTYPE html&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
  &lt;head&gt;
    &lt;title&gt;SVG 1.1, 2nd Edition&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;svg version=&quot;1.1&quot; baseProfile=&quot;full&quot; id=&quot;svg-root&quot; width=&quot;100%&quot; height=&quot;100%&quot; viewBox=&quot;0 0 480 360&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
      &lt;g id=&quot;test-body-content&quot;&gt;
        &lt;style id=&quot;test&quot;&gt;&lt;/style&gt;
      &lt;/g&gt;
    &lt;/svg&gt;
  &lt;/body&gt;
&lt;/html&gt;


Actual:
3.Error: Element style is missing required attribute type.

From line 9, column 9; to line 9, column 25

&gt;?        &lt;style id=&quot;test&quot;&gt;&lt;/styl

Expected:
No error

As stated in 
http://www.w3.org/TR/SVG/styling.html#StyleElement

type = content-type
This attribute specifies the style sheet language of the element&apos;s contents. The style sheet language is specified as a content type (e.g., &quot;text/css&quot;), as per MIME Part Two: Media Types [RFC2046]. If a ‘type’ is not provided, the value of ‘contentStyleType’ on the ‘svg’ element shall be used, which in turn defaults to &quot;text/css&quot; [RFC2046]. If a ‘style’ element falls outside of the outermost svg element and the ‘type’ is not provided, the ‘type’ must default to &quot;text/css&quot; [RFC2046]. 
Animatable: no.

It implies that type can be missing from style tag, should be optional.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68236</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2012-05-29 07:58:17 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; svg style validating should not treat type as required attribute
&gt; [...]
&gt; As stated in 
&gt; http://www.w3.org/TR/SVG/styling.html#StyleElement
&gt; [...]
&gt; It implies that type can be missing from style tag, should be optional.

Actually, the spec language you cite there does not imply the style element is optional; it just says what UAs should do if it&apos;s omitted.

The prose of the SVG spec is unfortunately completely useless for determining what the actual document-conformance requirements are. The only way you can determine what&apos;s supposed to be required and what&apos;s not is to read the DTD. In this case, you need to read the following section:

  http://www.w3.org/TR/SVG/svgdtd.html#DTD.1.21

...where you&apos;ll find this:

  type %ContentType.datatype; #REQUIRED

If you think it should not be required and/or you think the SVG Working Group should try to do a better job of actually making the requirements clear in the prose of the spec itself, please file a bug against the SVG spec instead:

  https://www.w3.org/Bugs/Public/enter_bug.cgi?product=SVG</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77052</commentid>
    <comment_count>2</comment_count>
    <who name="">xinyang_qiu</who>
    <bug_when>2012-10-24 16:29:17 +0000</bug_when>
    <thetext>I see. thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>