views:

119

answers:

1

I'm wondering because I want to store something other than pre-defined keywords that are typically assigned to rel... and I just wanted to know if this is valid XHTML Strict or not.

+2  A: 

From what I can say, in the DTD (can be downloaded from here) :

The <link> tag is defined as :

<!ELEMENT link EMPTY>
<!ATTLIST link
  %attrs;
  charset     %Charset;      #IMPLIED
  href        %URI;          #IMPLIED
  hreflang    %LanguageCode; #IMPLIED
  type        %ContentType;  #IMPLIED
  rel         %LinkTypes;    #IMPLIED
  rev         %LinkTypes;    #IMPLIED
  media       %MediaDesc;    #IMPLIED
  >

So, the rel is defined as %LinkTypes;.


Same for the <a> tag :

<!ELEMENT a %a.content;>
<!ATTLIST a
  %attrs;
  %focus;
  charset     %Charset;      #IMPLIED
  type        %ContentType;  #IMPLIED
  name        NMTOKEN        #IMPLIED
  href        %URI;          #IMPLIED
  hreflang    %LanguageCode; #IMPLIED
  rel         %LinkTypes;    #IMPLIED
  rev         %LinkTypes;    #IMPLIED
  shape       %Shape;        "rect"
  coords      %Coords;       #IMPLIED
  >


And the entity LinkTypes is defined as :

<!ENTITY % LinkTypes "CDATA">
    <!-- space-separated list of link types -->


So, trying to make things short :

  • The rel attribute is supported, but only for <a> and <link> tags
  • The rel attribute can contain CDATA -- i.e. it's not restricted to a specific list of words.
Pascal MARTIN
PERFECTO! thank u =]
codeninja
You're welcome :-)
Pascal MARTIN