CTAN Comprehensive TeX Archive Network

Querying the CTAN Database with XML – List of Topics

The list of topics can be obtained under the URL

http://www.ctan.org/xml/1.1/topics

The result is an XML file as in the following listing:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE topics SYSTEM 'http://www.ctan.org/xml/1.1/catalogue.dtd'>
<topics>
  <topic name="abbrev" details="macros for defining abbreviations in documents"/>
  <topic name="abstract" details="typeset abstracts of documents"/>
  <topic name="accessible" details="accessibility support"/>
  <topic name="acrobat" details="relies on availability of Adobe Acrobat, etc."/>
  <topic name="acronym" details="define and use acronyms"/>
  …
</topics>  

The list has the outer tag <topics>. The topics contained in this list are ordered ascending on the key of the topic.

<topic>

Each topic is contained within the tag <topic>. This tag has several attributes:

key
This attribute contains the key of the topic. This attribute is mandatory.
details
This attribute contains a short descriptive text about the meaning of the topic.

Selecting

The list can be restricted to contain part of the topics only. The condition is that the name starts with a given string. This string is specified with the parameter key.

http://www.ctan.org/xml/1.1/topics?key=abbrev

The following example extracts all topics for which the key starts with the letter n:

http://www.ctan.org/xml/1.1/topics?key=n

Omitting Or Enforcing the Doctype Declaration

The list of licenses may include a doctype declaration. This declaration can be suppressed with the URL parameter no-dtd which should be set to true as in

http://www.ctan.org/xml/1.1/licenses?no-dtd=true

A doctype declaration can be enforced with the URL parameter no-dtd which should be set to false in this case.

The default is no-dtd=false.

Omitting the XML Declaration

The list of licenses starts with an XML declaration. This declaration can be suppressed with the URL parameter no-xml which should be set to true as in

http://www.ctan.org/xml/1.1/licenses?no-xml=true
Guest Book Sitemap Contact Contact Author