← Prev in month ← Prev in thread
Next in thread → Next in month →

FYI: DocBook element lookup form

From
Michael Smith <>
Date
2005-05-16T14:30:31+00:00
ID
Thread
FYI: DocBook element lookup form
For what it's worth, I've set up a simple element lookup form at: 

  http://docbook.sourceforge.net/element/

If you type (or paste in) in an element name, it will take you the page
for that element in the online version of DocBook: The Definitive Guide.

I set it up because a couple of translators working on
localizations had asked me if there was a quick way to look up
reference info on individual elements.

Here's the source for it:

  <?php
  if (isset($_GET['name'])) {
    // if 'goto' value specified in query string, redirect to
    // specified URL
    header("Location:" . "http://docbook.org/tdg/en/html/" . $_GET['name'] . ".html");
    exit;
  }
  ?>
  <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
      <title>DocBook Element Lookup Form</title>
    </head>
    <body>
      <h1 style="font-size: 120%; color: #096">DocBook Element Lookup</h1>
      <?php
        print "<form action='" . $_SERVER['PHP_SELF'] ."' method='get'>\n"
      ?>
        <p>
          <input name="name" type="text"/>&#160;&#160;<input type="submit"/>
        </p>
      <?php
        print "</form>\n"
      ?>
    </body>
  </html>


-- 
Michael Smith
http://logopoeia.com/  http://www.oreillynet.com/pub/au/890
← Prev in month ← Prev in thread
Next in thread → Next in month →