A specification of the XML used for articles, which parts are required and which are not, and the roles of each element and its attributes.
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="/devedge-srce/lib/xsl/devedge-1.00/article_en.xsl"?>
<nde:article
url="[url]"
xmlns:nde="http://devedge.netscape.com/2002/de"
xml:lang="[language code]">
<nde:header> </nde:header>
<nde:head> </nde:head>
<nde:content> </nde:content>
<nde:related> </nde:related>
</nde:article>
This is the basic toplevel skeleton for an article file. The four toplevel elements all have descendent elements. These are explained by the rest of this document.
The bracketed, italicized, light gray text represents stuff that needs to be replaced by the document author with the proper values. For example, for the article "Images, Tables, and Mysterious Gaps," the value of [url] would be /devedge-srce/viewsource/2002/img-table
, and [language code] would be en
.
nde:related
elements possible, one required and the other optional. These are discussed in detail later on.
nde:header
— The Document Header<nde:header> <nde:title>[insert title here]</nde:title> <nde:category>[insert category here]</nde:category> <nde:pubdate year="[CCYY]" month="[MM]" day="[DD]"/> <nde:moddate year="[CCYY]" month="[MM]" day="[DD]"/> <nde:summary>[short summary of piece (blurb text)]</nde:summary> <nde:abstract> [longer abstract, typically a paragraph in length] </nde:abstract> <nde:channels> <nde:channel id="[channel id]"/> <nde:channel id="[channel id]"/> </nde:channels> <nde:keywords>[comma separated, keywords]</nde:keywords> <nde:translations> <nde:trans url="[url]">[language]</nde:trans> </nde:translations> <nde:alternates> <nde:alt url="[url]">[format]</nde:alt> </nde:alternates> <nde:authlist> <nde:author> <nde:authname>[name]</nde:authname> <nde:authtitle>[title]</nde:authtitle> <nde:authaffil>[affiliation]</nde:authaffil> <nde:authcontact>[e-mail (if desired)]</nde:authcontact> <nde:authdesc>[bio statement; two short sentences maximum]</nde:authdesc> </nde:author> </nde:authlist> <nde:copyright> <nde:copyhold>[holder of copyright]</nde:copyhold> <nde:copyyear>[copyright date]</nde:copyyear> <nde:copyaddr>[contact information]</nde:copyaddr> </nde:copyright> </nde:header>
This is the meat of the file. It contains all of the really important data that isn't the actual content. Most of the elements in the header are optional, but this does not mean you should drop them. It simply means that the article can be published without the optional elements.
04
.
nde:pubdate
element.
nde:channels
element can contain one or more nde:channel
elements.
nde:channels
element:
<nde:channels> <nde:channel id="viewsource"/> <nde:channel id="dom"/> </nde:channels>The channel ID values are used to determine which pages on DevEdge will show the article. Thus, the above example would cause the article to show up as a new entry in Viewsource and the DOM Central. It would also appear in the RSS feeds for those two resources.
nde:translations
element can contain one or more nde:trans
elements.
nde:trans
element, the url
attribute is required, and there must be some content to the element. The content is used as the text of the link in the HTML document. The title
attribute is technically optional but strongly encouraged for accessibility reasons.
nde:alternates
element can contain one or more nde:alt
elements.
nde:alt
element, the url
attribute is required, and there must be some content to the element. The content is used as the text of the link in the HTML document. The title
attribute is technically optional but strongly encouraged for accessibility reasons.
nde:author
element. nde:author
has a number of subelements, all but one of which are optional.
nde:authname
is required for each nde:author
element.
nde:copyright
has three subelements, all of which are strongly recommended.
nde:head
— Content For the Document Head<nde:head>
[for document-specific styles, links, scripts, etc.]
</nde:head>
This element is used to insert any document-specific material into the HEAD element of the HTML document. This could be used to insert a complete stylesheet needed to display certain examples in the article, links to scripts that the article discusses in order to make examples work, and so on. This will only rarely be needed.
nde:content
— The Article Itself<nde:content> [content of article] </nde:content>
This element contains the actual content of the article. The article content should be authored according to the DevEdge editorial guidelines. Note that H2 elements should be used for section titles within the article, as these are used to generate a table of contents in the right rail.
nde:related
— Related Resources<nde:related area="nde">
<nde:item url="[url]" title="[title]">[link text]</nde:item>
</nde:related>
<nde:related area="ext">
<nde:item url="[url]" title="[title]">[link text]</nde:item>
</nde:related>
The nde:related
element is used to provide a list of related articles, areas of DevEdge, and external resources. For any article, there must be an nde:related
element with a value of nde
for the area
attribute. This is the list of links to resources on DevEdge that are related to the article. This is required because, at a minimum, it will list related Centrals. Any links to resources outside of DevEdge are listed in an optional nde:related
element whose area
attribute has been set to ext
. Each nde:related
element can contain one or more nde:item
elements.
nde:item
element, the url
attribute is required, and there must be some content to the element. The content is used as the text of the link in the HTML document. The title
attribute is technically optional but strongly encouraged for accessibility reasons.
<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl" href="/devedge-srce/lib/xsl/devedge-1.00/article_en.xsl"?> <nde:article url="[/devedge-srce/viewsource/2003/example-article/]" xmlns:nde="http://devedge.netscape.com/2002/de" xml:lang="[language code]"> <nde:header> <nde:title> [insert title here] </nde:title> <nde:category> [insert category here] </nde:category> <nde:pubdate year="[CCYY]" month="[MM]" day="[DD]"/> <nde:moddate year="[CCYY]" month="[MM]" day="[DD]"/> <nde:summary> [short summary of piece (blurb text)] </nde:summary> <nde:abstract> [longer abstract, typically a paragraph in length] </nde:abstract> <nde:channels> <nde:channel id="[channel id]"/> <nde:channel id="[channel id]"/> </nde:channels> <nde:keywords> [comma separated, keywords] </nde:keywords> <nde:translations> <nde:trans url="[url]" title="[title]">[language]</nde:trans> </nde:translations> <nde:alternates> <nde:alt url="[url]" title="[title]">[format]</nde:alt> </nde:alternates> <nde:authlist> <nde:author> <nde:authname>[name]</nde:authname> <nde:authtitle>[title]</nde:authtitle> <nde:authaffil>[affiliation]</nde:authaffil> <nde:authcontact>[info]</nde:authcontact> <nde:authdesc>[bio statement]</nde:authdesc> </nde:author> </nde:authlist> <nde:copyright> <nde:copyhold>[holder of copyright]</nde:copyhold> <nde:copyyear>[CCYY]</nde:copyyear> <nde:copyaddr>[contact information]</nde:copyaddr> </nde:copyright> </nde:header> <nde:head> [for document-specific styles, links, scripts, etc.] </nde:head> <nde:content> [ <h2 id="toc1">toc1</h2> <p>content of piece 1</p> <h2 id="toc2">toc2</h2> <p>content of piece 2</p> <h2>toc3</h2> <p>content of piece 3</p> <h2>toc4</h4> <p>content of piece 4</p> ] </nde:content> <nde:related area="nde"> <nde:item url="[url]" title="[title]">[link text]</nde:item> </nde:related> <nde:related area="ext"> <nde:item url="[url]" title="[title]">[link text]</nde:item> </nde:related> </nde:article>