phpDocumentor
[ class tree: phpDocumentor ] [ index: phpDocumentor ] [ all elements ]

inline {@id}

Used to control XML tutorial ids in refsects

Gregory Beaver
Tag Documentation written by cellog@php.net
Copyright 2002, Gregory Beaver
(phpDocumentor 1.2+)
{@id sectionname }

Description

The {@id} inline tag is used only in tutorials/extended documentation. It is very simply designed to solve the problem of identifying sections for hyperlinking. For instance, in the DocBook Converter, id's are in the format package.packagename[.subpackagename].file[.sectionname], where file is either the classname, function/method name, or summary. In the other Converters, the id is not nearly as restrictive, but this inline tag allows for the potential of future converters that are equally exacting. Use

<refsect1 id="{@id idname}">
in the tutorial (tutorialname.pkg/tutorialname.cls/tutorialname.proc) to do this.

The {@id} tag is context-sensitive, and will pre-pend the id of the current refsect1, refsect2, or refsect3 to any {@id}, allowing further error control.

The sectionname may only consist of lower-case letters, numbers, and hyphens "-." No other characters are allowed

Here is an example of how {@id} must be used

  1. <refentry id="{@id}">
  2.  <refnamediv>
  3.   <refname>Main Title</refname>
  4.   <refpurpose>Description of tutorial</refpurpose>
  5.  </refnamediv>
  6.  <refsynopsisdiv>
  7.   <refsynopsisdivinfo>
  8.    <author>
  9.     Gregory Beaver
  10.    </author>
  11.    <copyright>Copyright 2002, Gregory Beaver</copyright>
  12.   </refsynopsisdivinfo>
  13.  </refsynopsisdiv>
  14.  <refsect1 id="{@id section}">
  15.   <title>First Section Title</title>
  16.   <para>
  17.    Note that the id parameter must be within quotes
  18.    and there must be no whitespace on either side.
  19.    id=&quot;  {@id section}&quot; will break the id parsing
  20.   </para>
  21.   <para>
  22.    This section's name is 
  23.    &quot;packagesubpackagetutorial.ext.section&quot; by default.
  24.    The HTML/CHM converters name it &quot;section,&quot; the XML
  25.    converter names it &quot;package.subpackage.tutorial-ext.section&quot;
  26.   </para>
  27.   <refsect2 id="{@id subsection}">
  28.    <title>Subsection Title</title>
  29.    <para>
  30.     This section inherit's the refsect1's id, and is named
  31.     &quot;packagesubpackagetutorial.ext.section.subsection&quot; or
  32.     &quot;section.subsection&quot; for HTML/CHM, and
  33.     &quot;package.subpackage.tutorial-ext.section.subsection&quot; in XML
  34.    </para>
  35.   </refsect2>
  36.  </refsect1>
  37. </refentry>

Выше
inline {@example} phpDocumentor Inline tags inline {@internal}}
    Поддержать сайт на родительском проекте КГБ