products/Sources/formale Sprachen/Isabelle/Tools/jEdit/dist/doc/users-guide image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: xml-primer.html   Sprache: HTML

Original von: Isabelle©

 products/Sources/formale Sprachen/Isabelle/Tools/jEdit/dist/doc/users-guide/xml-primer.html


<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>An XML Primer</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="jEdit 5.6 User's Guide"><link rel="up" href="writing-modes.html" title="Chapter 10. Mode Definition Syntax"><link rel="prev" href="writing-modes.html" title="Chapter 10. Mode Definition Syntax"><link rel="next" href="mode-preamble.html" title="The Preamble and MODE tag"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">An XML Primer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="writing-modes.html">Prev</a> </td><th width="60%" align="center">Chapter 10. Mode Definition Syntax</th><td width="20%" align="right"> <a accesskey="n" href="mode-preamble.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xml-primer"></a>An XML Primer</h2></div></div></div><p>A very simple XML file (which also happens to be an edit mode)
        looks like so:</p><pre class="programlisting"><?xml version="1.0"?>

<!DOCTYPE MODE SYSTEM "xmode.dtd">

<MODE>
    <PROPS>
        <PROPERTY NAME="commentStart" VALUE="/*" />
        <PROPERTY NAME="commentEnd" VALUE="*/" />
    </PROPS>

    <RULES>
        <SPAN TYPE="COMMENT1">
            <BEGIN>/*</BEGIN>
            <END>*/</END>
        </SPAN>
    </RULES>
</MODE></pre><p>Note that each opening tag must have a corresponding closing tag.
        If there is nothing between the opening and closing tags, for example
        <code class="literal"><TAG></TAG></code>, the shorthand notation
        <code class="literal"><TAG /></code> may be used. An example of this
        shorthand can be seen in the <code class="literal"><PROPERTY></code> tags
        above.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"> Validation and Errors </h3><p> Most XML file formats have a formal grammar specified in either DTD, XSD or RNG.
In the example above, we can see that the <code class="literal">DOCTYPE</code>,
or formal grammar for jEdit mode files is described in <code class="literal">xmode.dtd</code>,
which happens to come from jEdit's source code.
If you install the XML plugin, and while editing a mode file in jEdit, go to
<span class="guimenuitem"><strong>Plugins - XML - Parse as XML</strong></span>,
you should see a structure tree in Sidekick,
and you will also see errors (if there are any) in ErrorList, if the document does not
conform to the proper XML syntax or the document's formal grammar.
In addition, the XML plugin provides completion tips for elements and attributes.
All of these things can help immensely especially when learning XML.
</p><p> It is highly recommended that you check your XML files for validation errors
before submitting them to the community. </p></div><p>XML is case sensitive. <code class="literal">Span</code> or
        <code class="literal">span</code> is not the same as
        <code class="literal">SPAN</code>.</p><p>To insert a special character such as < or > literally in
        XML (for example, inside an attribute value), you must write it as an
        <em class="firstterm">entity</em>. An entity consists of the character's
        symbolic name enclosed within <span class="quote">“<span class="quote">&</span>”</span> and <span class="quote">“<span class="quote">;</span>”</span>.
        The most frequently used entities are:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><code class="literal">&lt;</code> - The less-than (<)
                character</p></li><li class="listitem"><p><code class="literal">&gt;</code> - The greater-than (>)
                character</p></li><li class="listitem"><p><code class="literal">&amp;</code> - The ampersand (&)
                character</p></li></ul></div><p>For example, the following will cause a syntax error:</p><pre class="programlisting"><SEQ TYPE="OPERATOR">&</SEQ></pre><p>Instead, you must write:</p><pre class="programlisting"><SEQ TYPE="OPERATOR">&amp;</SEQ></pre><p>Now that the basics of XML have been covered, the rest of this
        section will cover each construct in detail.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="writing-modes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="writing-modes.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="mode-preamble.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 10. Mode Definition Syntax </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> The Preamble and MODE tag</td></tr></table></div></body></html>

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet)  ¤





Download des
Quellennavigators
Download des
sprechenden Kalenders

in der Quellcodebibliothek suchen




Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.


Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.


Bot Zugriff