Christoph Schnauß: Ersatz für target="_blank"

Beitrag lesen

hallo Stefan,

kenne mich da nicht so aus, aber XHTML 1.1 ist doch in dieser Modul-
bauweise, kann man da nicht einfach noch ein zusätzliches Modul ein-
binden, was Dir das target-Attribut für das a-Element ermöglicht?

kein "offizielles". Also keines vom W3C. Zuständig ist für <a> in XHTML1.1 http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-hypertext-1.mod, und da steht drin:
<!ENTITY % a.attlist  "INCLUDE" >
<![%a.attlist;[
<!ATTLIST %a.qname;
      %Common.attrib;
      href         %URI.datatype;           #IMPLIED
      charset      %Charset.datatype;       #IMPLIED
      type         %ContentType.datatype;   #IMPLIED
      hreflang     %LanguageCode.datatype;  #IMPLIED
      rel          %LinkTypes.datatype;     #IMPLIED
      rev          %LinkTypes.datatype;     #IMPLIED
      accesskey    %Character.datatype;     #IMPLIED
      tabindex     %Number.datatype;        #IMPLIED

bei HTML "transitional" ist dagegen http://www.w3.org/TR/html4/loose.dtd zuständig, und da steht drin:
<!ELEMENT A - - (%inline;)* -(A)       -- anchor -->
<!ATTLIST A
  %attrs;                              -- %coreattrs, %i18n, %events --
  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
  type        %ContentType;  #IMPLIED  -- advisory content type --
  name        CDATA          #IMPLIED  -- named link end --
  href        %URI;          #IMPLIED  -- URI for linked resource --
  hreflang    %LanguageCode; #IMPLIED  -- language code --
  target      %FrameTarget;  #IMPLIED  -- render in this frame --
  rel         %LinkTypes;    #IMPLIED  -- forward link types --
  rev         %LinkTypes;    #IMPLIED  -- reverse link types --
  accesskey   %Character;    #IMPLIED  -- accessibility key character --
  shape       %Shape;        rect      -- for use with client-side image maps --
  coords      %Coords;       #IMPLIED  -- for use with client-side image maps --
  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
  onfocus     %Script;       #IMPLIED  -- the element got the focus --
  onblur      %Script;       #IMPLIED  -- the element lost the focus --
  >

Wenn nicht, dann kannst Du ja immernoch eine eigene DTD verwenden,
dann ist die Sache natürlich nicht mehr W3C XHTML 1.1 (Strict).

richtig, das wäre die Alternative (übrigens gibts "strict" bei XHTML1.1 nicht). Aber ich dachte mir halt in aller Unschuld, ich könnte mal hier im Forum nachfragen. Kommt ja manchmal vor, daß jemand was weiß, was mir nicht so ganz geläufig ist ;-)

Grüße aus Berlin

Christoph S.