From: <nw...@us...> - 2007-12-16 18:36:28
|
Revision: 7616 http://docbook.svn.sourceforge.net/docbook/?rev=7616&view=rev Author: nwalsh Date: 2007-12-16 10:36:22 -0800 (Sun, 16 Dec 2007) Log Message: ----------- Branch to explore an XSLT 2.0 stylesheet design that uses explicit phases Modified Paths: -------------- branches/xsl2-phases/docbook/simple/Makefile Added Paths: ----------- branches/xsl2-phases/ branches/xsl2-phases/buildtools/ branches/xsl2-phases/defguide5/ branches/xsl2-phases/defguide5/en/src/ch03.xml Removed Paths: ------------- branches/xsl2-phases/buildtools/ branches/xsl2-phases/defguide5/ branches/xsl2-phases/defguide5/en/src/ch03.xml Copied: branches/xsl2-phases (from rev 7605, trunk) Copied: branches/xsl2-phases/buildtools (from rev 7611, trunk/buildtools) Copied: branches/xsl2-phases/defguide5 (from rev 7612, trunk/defguide5) Deleted: branches/xsl2-phases/defguide5/en/src/ch03.xml =================================================================== --- trunk/defguide5/en/src/ch03.xml 2007-12-16 17:26:29 UTC (rev 7612) +++ branches/xsl2-phases/defguide5/en/src/ch03.xml 2007-12-16 18:36:22 UTC (rev 7616) @@ -1,596 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<chapter xmlns="http://docbook.org/ns/docbook" - xmlns:xlink="http://www.w3.org/1999/xlink" - version="5.0" xml:id="ch-parse"> -<?dbhtml filename="ch03.html"?> -<title>Parsing DocBook Documents</title> -<info> - <pubdate>$Date$</pubdate> - <releaseinfo>$Revision$</releaseinfo> -</info> - -<para><indexterm id="parsDocch4" class="startofrange"><primary>parsing</primary> - <secondary>DocBook documents</secondary></indexterm> -<indexterm id="docDTDparsch4" class="startofrange"><primary>DocBook DTD</primary> - <secondary>parsing documents</secondary> -</indexterm>A key feature of <acronym>XML</acronym> markup is that you -<emphasis>validate</emphasis> it. The DocBook schema is a precise description -of valid nesting, the order of elements, and their content. All -DocBook documents must conform to this description or they are not -DocBook documents (by definition). -</para> - -<para><indexterm><primary>parsers</primary> - <secondary>validating</secondary></indexterm> -<indexterm><primary>validation</primary> - <secondary>parsers</secondary> -</indexterm>The validation technology that is built into XML is the -Document Type Definition or <acronym>DTD</acronym>. A -<firstterm>validating parser</firstterm> -is a program that can read the <acronym>DTD</acronym> and a particular -document and determine whether the exact nesting and order of elements -in the document is valid according to the <acronym>DTD</acronym>. -</para> - -<para>DocBook is now defined by a RELAX NG grammar so it is no longer -necessary to validate with the DTD. In fact, it isn't even very valuable -since the DTD version doesn't enforce many DocBook constraints.</para> - -<para>Instead, an external RELAX NG validator must be used.</para> - -<para> -<indexterm><primary>text editors</primary> - <secondary>unstructured, parsing and</secondary> -</indexterm>If you are not using a structured editor that can enforce -the markup as you type, validation with an external tool is a -particularly important step in the document creation process. You -cannot expect to get rational results from subsequent processing (such -as document publishing) if your documents are not valid. -</para> - -<para>There are several free RELAX NG validators including -Jing and MSV. For more detail about available RELAX NG tools, -see <link xlink:href="http://www.relax-ng.org/"/>.</para> - -<sect1 xml:id="ch03-validate"><title>Validating Your Documents</title> - -<para>As an example, we'll describe how you can use Jing for -validation. For information about your particular validator, consult -the documentation that came with it. -</para> - -<sect2><title>Using Jing</title> - -<para><indexterm><primary>Jing validator</primary> - <secondary>RELAX NG documents, validating</secondary> -</indexterm>The <command>jing</command> command performs RELAX NG -validation.</para> - -<screen>java -jar jing.jar -t docbook.rng test.xml -Elapsed time 562+75=637 milliseconds</screen> - -<para>The elapsed time is printed because we used the -<option>-t</option> option. Without that option, it produces no output -if there are no errors. </para> - -<para>By default, <command>jing</command> checks for ID constraints and - - The options used in the example below suppress the normal -output (<option>-s</option>), except for error messages, print the -version number (<option>-v</option>), and specify the catalog file -that should be used to map public identifiers to system identifiers. -Printing the version number guarantees that you always get -<emphasis>some</emphasis> output, so that you know the command ran -successfully: -</para> -<screen> -[n:\dbtdg] nsgmls -sv -c \share\sgml\catalog test.sgm -m:\jade\nsgmls.exe:I: SP version "1.3.2" -</screen> -<para> -<indexterm><primary>error messages</primary> - <secondary>nsgmls parser</secondary></indexterm> -<indexterm><primary>options</primary> - <secondary>error messages (parser), directing to file</secondary></indexterm> - -Because no error messages were printed, we know our document is valid. -If you're working with a document that you discover has many errors, -the <option>-f</option> option offers a handy way to direct the errors to a file -so they don't all scroll off your screen. -</para> -<para> -<indexterm><primary>nsgmls parser</primary> - <secondary>XML documents, validating</secondary></indexterm> -<indexterm><primary>declarations</primary> - <secondary>nsgmls parser</secondary></indexterm> -<indexterm><primary>xml.dcl declaration (nsgmls parser)</primary></indexterm> -<indexterm><primary>XML</primary> - <secondary>nsgmls parser</secondary></indexterm> - -If you want to validate an &XML; document with <acronym>SP</acronym>, -you must make sure that <acronym>SP</acronym> uses the correct -declaration. An &XML; declaration called <filename>xml.dcl</filename> is -included with <acronym>SP</acronym>. -</para> - -<para> -The easiest way to make sure that <acronym>SP</acronym> uses <filename>xml.dcl</filename> is to -include the declaration explicitly on the command line when you run -<command>nsgmls</command> (or Jade, or other <acronym>SP</acronym> tools): -</para> -<screen> -[n:\dbtdg] nsgmls -sv -c \share\sgml\catalog m:\jade\xml.dcl test.xml -m:\jade\nsgmls.exe:I: SP version "1.3.2" -</screen> -</sect2> - -<sect2><title>Using xp</title> -<para> -<indexterm><primary>xp parser</primary></indexterm> -<indexterm><primary>Time program (xp parser)</primary></indexterm> - -The <application>xp</application> distribution includes several sample programs. -One of these programs, <command>Time</command>, performs a validating parse -of the document and prints the amount of time required to parse the -&DTD; and the document. This program makes an excellent validity -checker: -</para> -<screen> -java com.jclark.xml.apps.Time examples\simple.xml -6.639 -</screen> -<para> -The result states that it took 6.639 seconds to parse the &DTD; and -the document. This indicates that the document is valid. If the -document is invalid, additional error messages are displayed. -</para> -</sect2> -</sect1> -<sect1 id="ch03-parseerr"><title>Understanding Parse Errors</title> -<para> -<indexterm id="errorparsech4" class="startofrange"><primary>errors</primary> - <secondary>parsing</secondary></indexterm> - -<indexterm><primary>parsing</primary> - <secondary>errors</secondary></indexterm> -<indexterm><primary>error messages</primary> - <secondary>parsers</secondary></indexterm> - -Every parser produces slightly different error messages, but most -indicate exactly (at least technically)<footnote> -<para> -It is often the case that you can correct an error in the document in -several ways. The parser suggests one possible fix, but this is not -always the right fix. For example, the parser may suggest that you -can correct out of context data by adding another element, when in -fact it's “obvious” to human eyes that the problem is a -missing end tag. -</para> -</footnote> what is wrong and where the error occurred. With a little -experience, this information is all you'll need to quickly identify -what's wrong. -</para> -<para> - -<indexterm><primary>Jade</primary> - <secondary>SP parser, using</secondary></indexterm> - -In the rest of this section, we'll look at a number of common errors -and the messages they produce in <acronym>SP</acronym>. We've -chosen <acronym>SP</acronym> for the rest of these examples because -that is the same parser used by Jade, which we'll be discussing -further in <xref linkend="ch-publish"/>. -</para> -<sect2><title>&DTD; Cannot Be Found</title> -<para> -<indexterm><primary>cannot be found errors</primary></indexterm> -<indexterm><primary>DTDs</primary> - <secondary>cannot be found errors</secondary></indexterm> -<indexterm><primary>public identifiers</primary> - <secondary>errors</secondary></indexterm> - -The telltale sign that SP could not find the &DTD;, or some module of -the &DTD;, is the error message: "cannot generate system identifier -for public text …". Generally, the errors that occur after -this are spurious; if SP couldn't find some part of the &DTD;, -it's likely to think that <emphasis>everything</emphasis> is wrong. -</para> -<para> -Careful examination of the following document will show that we've -introduced a simple typographic error into the public identifier (the -word <quote>DocBook</quote> is misspelled with a lowercase <quote>b</quote>): -</para> -<programlisting> -<inlinegraphic format="linespecific" fileref="examples/errs/nodtd.sgm"/> -</programlisting> -<para> -SP responds dramatically to this error: -</para> -<screen> -hermes:/documents/books/tdg/examples/errs$ nsgmls -sv -c cat1 /usr/lib/sgml/declaration/xml.dcl nodtd.sgm -nsgmls:I: SP version "1.3.4" -nsgmls:nodtd.sgm:2:76:E: could not resolve host "www.oasis-open.org" (try again later) -nsgmls:nodtd.sgm:2:76:E: DTD did not contain element declaration for document type name -nsgmls:nodtd.sgm:3:8:E: element "chapter" undefined -nsgmls:nodtd.sgm:3:15:E: element "title" undefined -nsgmls:nodtd.sgm:4:5:E: element "para" undefined -nsgmls:nodtd.sgm:10:5:E: element "para" undefined -nsgmls:nodtd.sgm:11:15:E: there is no attribute "role" -nsgmls:nodtd.sgm:11:21:E: element "emphasis" undefined -nsgmls:nodtd.sgm:12:9:E: element "emphasis" undefined -nsgmls:nodtd.sgm:12:24:E: element "emphasis" undefined -nsgmls:nodtd.sgm:13:18:E: element "superscript" undefined -nsgmls:nodtd.sgm:14:16:E: element "subscript" undefined -nsgmls:nodtd.sgm:16:5:E: element "para" undefined -</screen> -<para> -<indexterm><primary>catalog files</primary> - <secondary>errors</secondary></indexterm> - -Other things to look for, if you haven't misspelled the public -identifier, are typos in the catalog or failure to specify a catalog -that resolves the public identifier that can't be found. -</para> -</sect2> -<sect2><title><acronym>ISO</acronym> Entity Set Missing</title> -<para> - -<indexterm><primary>entity sets</primary> - <secondary>missing</secondary></indexterm> - -A missing entity set is another example of either a misspelled public -identifier, or a missing catalog or catalog entry. -</para> -<para> -In this case, there's nothing wrong with the document, but the catalog -that's been specified is missing the public identifiers for the -<acronym>ISO</acronym> entity sets: -</para> -<screen> -[n:\dbtdg]nsgmls -sv -c examples\errs\cat2 examples\simple.sgm -m:\jade\nsgmls.exe:I: SP version "1.3.2" -m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:53:65:W: cannot generate system identifier for public text "ISO 8879:1986//ENTITIES Added Math Symbols:Arrow Relations//EN" -m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:54:8:E: reference to entity "ISOamsa" for which no system identifier could be generated -m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:52:0: entity was defined here -m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:60:66:W: cannot generate system identifier for public text "ISO 8879:1986//ENTITIES Added Math Symbols:Binary Operators//EN" -m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:61:8:E: reference to entity "ISOamsb" for which no system identifier could be generated -m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:59:0: entity was defined here -m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:67:60:W: cannot generate system identifier for public text "ISO 8879:1986//ENTITIES Added Math Symbols:Delimiters//EN" -m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:68:8:E: reference to entity "ISOamsc" for which no system identifier could be generated -m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:66:0: entity was defined here -m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:74:67:W: cannot generate system identifier for public text "ISO 8879:1986//ENTITIES Added Math Symbols:Negated Relations//EN" -... -</screen> -<para> -<indexterm><primary>entity sets</primary> - <secondary>locating</secondary></indexterm> - -The <acronym>ISO</acronym> entity sets are required by the DocBook -&DTD;, but they are not distributed with it. That's because they -aren't maintained by <acronym>OASIS</acronym>.<footnote> -<para> -If you need to locate the entity sets, consult <ulink url="http://www.oasis-open.org/cover/topics.html#entities">http://www.oasis-open.org/cover/topics.html#entities</ulink>. -</para> -</footnote> -</para> -</sect2> -<sect2><title>Character Data Not Allowed Here</title> -<para> -<indexterm><primary>error messages</primary> - <secondary>character data out of context</secondary></indexterm> -<indexterm><primary>characters</primary> - <secondary>errors (out of context)</secondary></indexterm> -<indexterm><primary>start tags</primary> - <secondary>errors</secondary></indexterm> - -Out of context character data is frequently caused by a missing start -tag, but sometimes it's just the result of typing in the wrong place! -</para> -<programlisting> -<inlinegraphic format="linespecific" fileref="examples/errs/badpcdata.sgm"/> -</programlisting> -<screen> -[n:\dbtdg] nsgmls -sv -c \share\sgml\catalog examples\errs\badpcdata.sgm -m:\jade\nsgmls.exe:I: SP version "1.3.2" -m:\jade\nsgmls.exe:examples\errs\badpcdata.sgm:9:0:E: character data is not allowed here -</screen> -<para> -<indexterm><primary>Chapter element</primary> - <secondary>errors, character data</secondary></indexterm> - -<sgmltag>Chapter</sgmltag>s aren't allowed to contain character data -directly. Here, a wrapper element, such as <sgmltag>Para</sgmltag>, is -missing around the sentence between the first two paragraphs. -</para> -</sect2> -<sect2><title>Misspelled Start Tag</title> -<para> -<indexterm><primary>start tags</primary> - <secondary>errors</secondary> - <tertiary>misspelling</tertiary></indexterm> - -If you spell it wrong, the parser gets confused. -</para> -<programlisting> -<inlinegraphic format="linespecific" fileref="examples/errs/misspell.sgm"/> -</programlisting> -<screen> -[n:\documents\books\dbtdg]nsgmls -sv -c \share\sgml\catalog examples\errs\misspe -ll.sgm -m:\jade\nsgmls.exe:I: SP version "1.3.2" -m:\jade\nsgmls.exe:examples\errs\misspell.sgm:9:5:E: element "PAAR" undefined -m:\jade\nsgmls.exe:examples\errs\misspell.sgm:14:6:E: end tag for element "PARA" which is not open -m:\jade\nsgmls.exe:examples\errs\misspell.sgm:21:9:E: end tag for "PAAR" omitted, but OMITTAG NO was specified -m:\jade\nsgmls.exe:examples\errs\misspell.sgm:9:0: start tag was here -</screen> -<para> -Luckily, these are pretty easy to spot, unless you accidentally spell -the name of another element. In that case, your error might appear to -be out of context. -</para> -</sect2> -<sect2><title>Misspelled End Tag</title> -<para> -<indexterm><primary>end tags</primary> - <secondary>errors, misspelling</secondary></indexterm> - -Spelling the end tag wrong is just as confusing. -</para> -<programlisting> -<inlinegraphic format="linespecific" fileref="examples/errs/misspell2.sgm"/> -</programlisting> -<screen> -[n:\dbtdg]nsgmls -sv -c \share\sgml\catalog examples\errs\misspell2.sgm -m:\jade\nsgmls.exe:I: SP version "1.3.2" -m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:2:35:E: end tag for element "TITEL" which is not open -m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:3:5:E: document type does not allow element "PARA" here; missing one of "FOOTNOTE", "MSGTEXT" start-tag -m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:9:5:E: document type does not allow element "PARA" here; missing one of "FOOTNOTE", "MSGTEXT" start-tag -m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:15:5:E: document type does not allow element "PARA" here; missing one of "FOOTNOTE", "MSGTEXT" start-tag -m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:21:9:E: end tag for "TITLE" omitted, but OMITTAG NO was specified -m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:2:9: start tag was here -m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:21:9:E: end tag for "CHAPTER" which is not finished -</screen> -<para> -These are pretty easy to spot as well, but look at how confused the -parser became. From the parser's point of view, failure to close the -open <sgmltag>Title</sgmltag> element means that all the following elements -appear out of context. -</para> -</sect2> -<sect2><title>Out of Context Start Tag</title> -<para> -<indexterm><primary>start tags</primary> - <secondary>errors</secondary> - <tertiary>out of context</tertiary></indexterm> -<indexterm><primary>tags</primary> - <secondary>context errors</secondary></indexterm> - -Sometimes the problem isn't spelling, but placing a tag in the wrong -context. When this happens, the parser tries to figure out what it -can add to your document to make it valid. Then it proceeds as if it -had seen what was added in order to recover from the error seen, which -can cause future errors. -</para> -<programlisting> -<inlinegraphic format="linespecific" fileref="examples/errs/badstarttag.sgm"/> -</programlisting> -<screen> -[n:\dbtdg]nsgmls -sv -c \share\sgml\catalog examples\errs\badstarttag.sgm -m:\jade\nsgmls.exe:I: SP version "1.3.2" -m:\jade\nsgmls.exe:examples\errs\badstarttag.sgm:9:12:E: document type does not allow element "TITLE" here; missing one of "CALLOUTLIST", "SEGMENTEDLIST", "VARIABLELIST", "CAUTION", "IMPORTANT", "NOTE", "TIP", "WARNING", "BLOCKQUOTE", "EQUATION", "EXAMPLE", "FIGURE", "TABLE" start-tag -</screen> -<para> -<indexterm><primary>titles</primary> - <secondary>formal elements</secondary> - <tertiary>errors</tertiary></indexterm> -<indexterm><primary>paragraphs</primary> - <secondary>titles</secondary></indexterm> - -In this example, we probably wanted a <sgmltag>FormalPara</sgmltag>, so that -we could have a title on the paragraph. But note that the parser -didn't suggest this alternative. The parser only tries to add -additional elements, rather than rename elements that it's already -seen. -</para> -</sect2> -<sect2><title>Missing End Tag</title> -<para> -<indexterm><primary>end tags</primary> - <secondary>missing, errors</secondary></indexterm> - -Leaving out an end tag is a lot like an out of context start tag. In -fact, they're really the same error. The problem is never caused by -the missing end tag per se, rather it's caused by the fact that -something following it is now out of context. -</para> -<programlisting> -<inlinegraphic format="linespecific" fileref="examples/errs/noendtag.sgm"/> -</programlisting> -<screen> -[n:\dbtdg]nsgmls -sv -c \share\sgml\catalog examples\errs\noendtag.sgm -m:\jade\nsgmls.exe:I: SP version "1.3.2" -m:\jade\nsgmls.exe:examples\errs\noendtag.sgm:14:5:E: document type does not allow element "PARA" here; missing one of "FOOTNOTE", "MSGTEXT", "CAUTION", "IMPORTANT", "NOTE", "TIP", "WARNING", "BLOCKQUOTE", "INFORMALEXAMPLE" start-tag -m:\jade\nsgmls.exe:examples\errs\noendtag.sgm:20:9:E: end tag for "PARA" omitted, but OMITTAG NO was specified -m:\jade\nsgmls.exe:examples\errs\noendtag.sgm:9:0: start tag was here -</screen> -<para> -In this case, the parser figured out that the best thing it could do -is end the paragraph. -</para> -</sect2> -<sect2><title>Bad Entity Reference</title> -<para> -<indexterm><primary>entities</primary> - <secondary>errors, spelling</secondary></indexterm> - -If you spell an entity name wrong, the parser will catch it. -</para> -<programlisting> -<inlinegraphic format="linespecific" fileref="examples/errs/badent.sgm"/> -</programlisting> -<screen> -[n:\dbtdg]nsgmls -sv -c \share\sgml\catalog examples\errs\badent.sgm -m:\jade\nsgmls.exe:I: SP version "1.3.2" -m:\jade\nsgmls.exe:examples\errs\badent.sgm:10:26:E: general entity "xyzzy" not defined and no default entity -</screen> -<para> -More often than not, you'll see this when you misspell a character -entity name. For example, this happens when you type -<literal>&ldqou;</literal> instead of -<literal>&ldquo;</literal>. -</para> -</sect2> -<sect2><title>Invalid 8-Bit Character</title> -<para> -<indexterm><primary>characters</primary> - <secondary>character sets</secondary> - <tertiary>Unicode character set (SGML errors)</tertiary></indexterm> -<indexterm><primary>8-bit characters, errors (SGML)</primary></indexterm> -<indexterm><primary>errors</primary> - <secondary>8-bit characters (SGML)</secondary></indexterm> - -In &XML;, the entire range of Unicode characters is available to you, -but in &SGML;, the declaration indicates what characters are valid. -The distributed DocBook declaration doesn't allow a bunch of fairly -common 8-bit characters. -</para> -<programlisting> -<inlinegraphic format="linespecific" fileref="examples/errs/badchar.sgm"/> -</programlisting> -<screen> -[n:\dbtdg]nsgmls -sv -c \share\sgml\catalog examples\errs\badchar.sgm -m:\jade\nsgmls.exe:I: SP version "1.3.2" -m:\jade\nsgmls.exe:examples\errs\badchar.sgm:11:0:E: non SGML character number 147 -m:\jade\nsgmls.exe:examples\errs\badchar.sgm:11:5:E: non SGML character number 148 -</screen> -<para> -<indexterm><primary>declarations</primary> - <secondary>character sets, errors</secondary></indexterm> -<indexterm><primary>entities</primary> - <secondary>characters</secondary> - <tertiary>errors</tertiary></indexterm> - -In this example, the Windows code page values for -curly left and right quotes have been used, but they aren't in the -declared character set. Fix this by converting them to character -entities. -</para> -<para> -<indexterm><primary>interchange partners</primary></indexterm> - -You can also fix them by changing the declaration, but if you do that, -make sure all your interchange partners are aware of, and have a copy of, -the modified declaration. See <xref linkend="app-interchange"/>. -<indexterm startref="errorparsech4" class="endofrange"/> -<indexterm startref="parsDocch4" class="endofrange"/> -<indexterm startref="docDTDparsch4" class="endofrange"/> -</para> -</sect2> -</sect1> - -<sect1 id="ch03-otherschema"><title>Considering Other Schema Languages</title> - -<para>Historically, &DTD;s were the only way to describe the valid -stricture of SGML and XML documents, but that is no longer the case. -At the time of this writing (January, 2001), DocBook is experimentally -available in three other schema languages:</para> - -<variablelist> -<varlistentry> -<term><ulink url="http://www.w3.org/XML/Schema">XML Schema</ulink></term> -<listitem> -<para>The schema language being defined by the -<ulink url="http://www.w3.org/">W3C</ulink> as the successor to &DTD;s -for describing the structure of &XML;. XML Schema are likely to become -a <ulink url="http://www.w3.org/">W3C</ulink> Recommendation in 2001. -</para></listitem> -</varlistentry> -<varlistentry> -<term><ulink url="http://www.xml.gr.jp/relax/">RELAX</ulink></term> -<listitem> -<para>RELAX, the Regular Language description for XML) is a less -complex alternative to XML Schemas. The RELAX Core module is defined by -ISO in <citetitle>ISO/IEC DTR 22250-1, Document Description and -Processing Languages -- Regular Language Description for XML (RELAX) --- Part 1: RELAX Core, 2000</citetitle>. The RELAX Namespaces module -is currently under development. -</para> -</listitem> -</varlistentry> -<varlistentry> -<term><ulink url="http://www.thaiopensource.com/trex/">TREX</ulink></term> -<listitem> -<para>TREX, Tree Regular Expressions for XML, is another less complex -alternative to XML Schemas. It is concise, powerful, and datatype -neutral.</para> -</listitem> -</varlistentry> -</variablelist> - -<sect2><title>Parsing and Validation</title> - -<para>Before we look closer at these new schema languages, there's one -significant difference between &DTD;s and all of them that we should -get out of the way: &XML; parsers (which may understand &DTD;s) build an -&XML; information set out of a stream of characters, all of these other -schema languages begin with an information set and perform validation -on it.</para> - -<para>What I mean by that is that an &XML; parser reads a stream of -bytes: - -<screen>"<" "?" "x" "m" "l" " " "v" "e" ... -"<" "!" "D" "O" "C" "T" "Y" "P" "E" " " "b" "o" "o" "k" ... -"<" "b" "o" "o" "k" " " "i" "d" "=" "'" "f" "o" "o" "'" ">" -... -"<" "/" "b" "o" "o" "k" ">"</screen> - -interprets them as a stream of characters (which may change the -interpretation of some sequences of bytes) and constructs some -representation of the &XML; document. This representation is the set -of all the &XML; information items encountered: the information -set of the document. The <ulink url="http://www.w3.org/">W3C</ulink> -<ulink url="http://www.w3.org/XML/">XML Core Working Group</ulink> -is in the process of defining what an -<ulink url="http://www.w3.org/TR/xml-infoset">&XML; Information Set</ulink> -contains.</para> - -<para>The other schema languages are defined not in terms of the sequence -of characters in the file but in terms of the information set of the -&XML; document. They have to work this way because the -<ulink url="http://www.w3.org/TR/REC-xml">&XML; Recommendation</ulink> -says what an &XML; document is and they all want to work on top of -&XML;.</para> - -<para>So what, you might ask? Well, it turns out that this has at least -one very significant implication: there's no way for these languages to -provide support for entity declarations.</para> - -<para>An entity, like <quote><literal>&ora;</literal></quote> -as a shortcut for <quote>O'Reilly & Associates</quote> or -<quote><literal>&eacute;</literal></quote> as a mnemonic for -<quote>é</quote>, is a feature of the character stream seen by -the &XML; parser, it doesn't exist in the information set of valid -&XML; documents. More importantly, this means that even if the schema -language had a syntax for declaring entities, it wouldn't help the &XML; -parser that needs to know the definitions long before the schema language -processor comes into play.</para> - -<para>There are a couple of other &XML; features that are impacted, -though not necessarily as significantly: notations and default -attribute values. One use for notations is on external entity -declarations, and as we've already seen, the schema language is too -late to be useful for anything entity related. Default attribute values -are also problematic since you would like them to be in the information -set produced by the parser so that the schema language sees them.</para> - -</sect2> - -<sect2><title>A Coarse Comparison of Three &XML; Schema Languages</title> - -<para>FIXME: write a short synopsis of how these languages compare.</para> - -</sect2> - -</sect1> -</chapter> Copied: branches/xsl2-phases/defguide5/en/src/ch03.xml (from rev 7615, trunk/defguide5/en/src/ch03.xml) =================================================================== --- branches/xsl2-phases/defguide5/en/src/ch03.xml (rev 0) +++ branches/xsl2-phases/defguide5/en/src/ch03.xml 2007-12-16 18:36:22 UTC (rev 7616) @@ -0,0 +1,596 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="5.0" xml:id="ch-parse"> +<?dbhtml filename="ch03.html"?> +<title>Parsing DocBook Documents</title> +<info> + <pubdate>$Date$</pubdate> + <releaseinfo>$Revision$</releaseinfo> +</info> + +<para><indexterm id="parsDocch4" class="startofrange"><primary>parsing</primary> + <secondary>DocBook documents</secondary></indexterm> +<indexterm id="docDTDparsch4" class="startofrange"><primary>DocBook DTD</primary> + <secondary>parsing documents</secondary> +</indexterm>A key feature of <acronym>XML</acronym> markup is that you +<emphasis>validate</emphasis> it. The DocBook schema is a precise description +of valid nesting, the order of elements, and their content. All +DocBook documents must conform to this description or they are not +DocBook documents (by definition). +</para> + +<para><indexterm><primary>parsers</primary> + <secondary>validating</secondary></indexterm> +<indexterm><primary>validation</primary> + <secondary>parsers</secondary> +</indexterm>The validation technology that is built into XML is the +Document Type Definition or <acronym>DTD</acronym>. A +<firstterm>validating parser</firstterm> +is a program that can read the <acronym>DTD</acronym> and a particular +document and determine whether the exact nesting and order of elements +in the document is valid according to the <acronym>DTD</acronym>. +</para> + +<para>DocBook is now defined by a RELAX NG grammar so it is no longer +necessary to validate with the DTD. In fact, it isn't even very valuable +since the DTD version doesn't enforce many DocBook constraints.</para> + +<para>Instead, an external RELAX NG validator must be used.</para> + +<para> +<indexterm><primary>text editors</primary> + <secondary>unstructured, parsing and</secondary> +</indexterm>If you are not using a structured editor that can enforce +the markup as you type, validation with an external tool is a +particularly important step in the document creation process. You +cannot expect to get rational results from subsequent processing (such +as document publishing) if your documents are not valid. +</para> + +<para>There are several free RELAX NG validators including +Jing and MSV. For more detail about available RELAX NG tools, +see <link xlink:href="http://www.relax-ng.org/"/>.</para> + +<sect1 xml:id="ch03-validate"><title>Validating Your Documents</title> + +<para>As an example, we'll describe how you can use Jing for +validation. For information about your particular validator, consult +the documentation that came with it. +</para> + +<sect2><title>Using Jing</title> + +<para><indexterm><primary>Jing validator</primary> + <secondary>RELAX NG documents, validating</secondary> +</indexterm>The <command>jing</command> command performs RELAX NG +validation.</para> + +<screen>java -jar jing.jar -t docbook.rng test.xml +Elapsed time 562+75=637 milliseconds</screen> + +<para>The elapsed time is printed because we used the +<option>-t</option> option. Without that option, it produces no output +if there are no errors. </para> + +<para>By default, <command>jing</command> checks for ID constraints and + + The options used in the example below suppress the normal +output (<option>-s</option>), except for error messages, print the +version number (<option>-v</option>), and specify the catalog file +that should be used to map public identifiers to system identifiers. +Printing the version number guarantees that you always get +<emphasis>some</emphasis> output, so that you know the command ran +successfully: +</para> +<screen> +[n:\dbtdg] nsgmls -sv -c \share\sgml\catalog test.sgm +m:\jade\nsgmls.exe:I: SP version "1.3.2" +</screen> +<para> +<indexterm><primary>error messages</primary> + <secondary>nsgmls parser</secondary></indexterm> +<indexterm><primary>options</primary> + <secondary>error messages (parser), directing to file</secondary></indexterm> + +Because no error messages were printed, we know our document is valid. +If you're working with a document that you discover has many errors, +the <option>-f</option> option offers a handy way to direct the errors to a file +so they don't all scroll off your screen. +</para> +<para> +<indexterm><primary>nsgmls parser</primary> + <secondary>XML documents, validating</secondary></indexterm> +<indexterm><primary>declarations</primary> + <secondary>nsgmls parser</secondary></indexterm> +<indexterm><primary>xml.dcl declaration (nsgmls parser)</primary></indexterm> +<indexterm><primary>XML</primary> + <secondary>nsgmls parser</secondary></indexterm> + +If you want to validate an XML document with <acronym>SP</acronym>, +you must make sure that <acronym>SP</acronym> uses the correct +declaration. An XML declaration called <filename>xml.dcl</filename> is +included with <acronym>SP</acronym>. +</para> + +<para> +The easiest way to make sure that <acronym>SP</acronym> uses <filename>xml.dcl</filename> is to +include the declaration explicitly on the command line when you run +<command>nsgmls</command> (or Jade, or other <acronym>SP</acronym> tools): +</para> +<screen> +[n:\dbtdg] nsgmls -sv -c \share\sgml\catalog m:\jade\xml.dcl test.xml +m:\jade\nsgmls.exe:I: SP version "1.3.2" +</screen> +</sect2> + +<sect2><title>Using xp</title> +<para> +<indexterm><primary>xp parser</primary></indexterm> +<indexterm><primary>Time program (xp parser)</primary></indexterm> + +The <application>xp</application> distribution includes several sample programs. +One of these programs, <command>Time</command>, performs a validating parse +of the document and prints the amount of time required to parse the +DTD and the document. This program makes an excellent validity +checker: +</para> +<screen> +java com.jclark.xml.apps.Time examples\simple.xml +6.639 +</screen> +<para> +The result states that it took 6.639 seconds to parse the DTD and +the document. This indicates that the document is valid. If the +document is invalid, additional error messages are displayed. +</para> +</sect2> +</sect1> +<sect1 id="ch03-parseerr"><title>Understanding Parse Errors</title> +<para> +<indexterm id="errorparsech4" class="startofrange"><primary>errors</primary> + <secondary>parsing</secondary></indexterm> + +<indexterm><primary>parsing</primary> + <secondary>errors</secondary></indexterm> +<indexterm><primary>error messages</primary> + <secondary>parsers</secondary></indexterm> + +Every parser produces slightly different error messages, but most +indicate exactly (at least technically)<footnote> +<para> +It is often the case that you can correct an error in the document in +several ways. The parser suggests one possible fix, but this is not +always the right fix. For example, the parser may suggest that you +can correct out of context data by adding another element, when in +fact it's “obvious” to human eyes that the problem is a +missing end tag. +</para> +</footnote> what is wrong and where the error occurred. With a little +experience, this information is all you'll need to quickly identify +what's wrong. +</para> +<para> + +<indexterm><primary>Jade</primary> + <secondary>SP parser, using</secondary></indexterm> + +In the rest of this section, we'll look at a number of common errors +and the messages they produce in <acronym>SP</acronym>. We've +chosen <acronym>SP</acronym> for the rest of these examples because +that is the same parser used by Jade, which we'll be discussing +further in <xref linkend="ch-publish"/>. +</para> +<sect2><title>DTD Cannot Be Found</title> +<para> +<indexterm><primary>cannot be found errors</primary></indexterm> +<indexterm><primary>DTDs</primary> + <secondary>cannot be found errors</secondary></indexterm> +<indexterm><primary>public identifiers</primary> + <secondary>errors</secondary></indexterm> + +The telltale sign that SP could not find the DTD, or some module of +the DTD, is the error message: "cannot generate system identifier +for public text …". Generally, the errors that occur after +this are spurious; if SP couldn't find some part of the DTD, +it's likely to think that <emphasis>everything</emphasis> is wrong. +</para> +<para> +Careful examination of the following document will show that we've +introduced a simple typographic error into the public identifier (the +word <quote>DocBook</quote> is misspelled with a lowercase <quote>b</quote>): +</para> +<programlisting> +<inlinegraphic format="linespecific" fileref="examples/errs/nodtd.sgm"/> +</programlisting> +<para> +SP responds dramatically to this error: +</para> +<screen> +hermes:/documents/books/tdg/examples/errs$ nsgmls -sv -c cat1 /usr/lib/sgml/declaration/xml.dcl nodtd.sgm +nsgmls:I: SP version "1.3.4" +nsgmls:nodtd.sgm:2:76:E: could not resolve host "www.oasis-open.org" (try again later) +nsgmls:nodtd.sgm:2:76:E: DTD did not contain element declaration for document type name +nsgmls:nodtd.sgm:3:8:E: element "chapter" undefined +nsgmls:nodtd.sgm:3:15:E: element "title" undefined +nsgmls:nodtd.sgm:4:5:E: element "para" undefined +nsgmls:nodtd.sgm:10:5:E: element "para" undefined +nsgmls:nodtd.sgm:11:15:E: there is no attribute "role" +nsgmls:nodtd.sgm:11:21:E: element "emphasis" undefined +nsgmls:nodtd.sgm:12:9:E: element "emphasis" undefined +nsgmls:nodtd.sgm:12:24:E: element "emphasis" undefined +nsgmls:nodtd.sgm:13:18:E: element "superscript" undefined +nsgmls:nodtd.sgm:14:16:E: element "subscript" undefined +nsgmls:nodtd.sgm:16:5:E: element "para" undefined +</screen> +<para> +<indexterm><primary>catalog files</primary> + <secondary>errors</secondary></indexterm> + +Other things to look for, if you haven't misspelled the public +identifier, are typos in the catalog or failure to specify a catalog +that resolves the public identifier that can't be found. +</para> +</sect2> +<sect2><title><acronym>ISO</acronym> Entity Set Missing</title> +<para> + +<indexterm><primary>entity sets</primary> + <secondary>missing</secondary></indexterm> + +A missing entity set is another example of either a misspelled public +identifier, or a missing catalog or catalog entry. +</para> +<para> +In this case, there's nothing wrong with the document, but the catalog +that's been specified is missing the public identifiers for the +<acronym>ISO</acronym> entity sets: +</para> +<screen> +[n:\dbtdg]nsgmls -sv -c examples\errs\cat2 examples\simple.sgm +m:\jade\nsgmls.exe:I: SP version "1.3.2" +m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:53:65:W: cannot generate system identifier for public text "ISO 8879:1986//ENTITIES Added Math Symbols:Arrow Relations//EN" +m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:54:8:E: reference to entity "ISOamsa" for which no system identifier could be generated +m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:52:0: entity was defined here +m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:60:66:W: cannot generate system identifier for public text "ISO 8879:1986//ENTITIES Added Math Symbols:Binary Operators//EN" +m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:61:8:E: reference to entity "ISOamsb" for which no system identifier could be generated +m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:59:0: entity was defined here +m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:67:60:W: cannot generate system identifier for public text "ISO 8879:1986//ENTITIES Added Math Symbols:Delimiters//EN" +m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:68:8:E: reference to entity "ISOamsc" for which no system identifier could be generated +m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:66:0: entity was defined here +m:\jade\nsgmls.exe:n:/share/sgml/docbook/3.1/dbcent.mod:74:67:W: cannot generate system identifier for public text "ISO 8879:1986//ENTITIES Added Math Symbols:Negated Relations//EN" +... +</screen> +<para> +<indexterm><primary>entity sets</primary> + <secondary>locating</secondary></indexterm> + +The <acronym>ISO</acronym> entity sets are required by the DocBook +DTD, but they are not distributed with it. That's because they +aren't maintained by <acronym>OASIS</acronym>.<footnote> +<para> +If you need to locate the entity sets, consult <ulink url="http://www.oasis-open.org/cover/topics.html#entities">http://www.oasis-open.org/cover/topics.html#entities</ulink>. +</para> +</footnote> +</para> +</sect2> +<sect2><title>Character Data Not Allowed Here</title> +<para> +<indexterm><primary>error messages</primary> + <secondary>character data out of context</secondary></indexterm> +<indexterm><primary>characters</primary> + <secondary>errors (out of context)</secondary></indexterm> +<indexterm><primary>start tags</primary> + <secondary>errors</secondary></indexterm> + +Out of context character data is frequently caused by a missing start +tag, but sometimes it's just the result of typing in the wrong place! +</para> +<programlisting> +<inlinegraphic format="linespecific" fileref="examples/errs/badpcdata.sgm"/> +</programlisting> +<screen> +[n:\dbtdg] nsgmls -sv -c \share\sgml\catalog examples\errs\badpcdata.sgm +m:\jade\nsgmls.exe:I: SP version "1.3.2" +m:\jade\nsgmls.exe:examples\errs\badpcdata.sgm:9:0:E: character data is not allowed here +</screen> +<para> +<indexterm><primary>Chapter element</primary> + <secondary>errors, character data</secondary></indexterm> + +<sgmltag>Chapter</sgmltag>s aren't allowed to contain character data +directly. Here, a wrapper element, such as <sgmltag>Para</sgmltag>, is +missing around the sentence between the first two paragraphs. +</para> +</sect2> +<sect2><title>Misspelled Start Tag</title> +<para> +<indexterm><primary>start tags</primary> + <secondary>errors</secondary> + <tertiary>misspelling</tertiary></indexterm> + +If you spell it wrong, the parser gets confused. +</para> +<programlisting> +<inlinegraphic format="linespecific" fileref="examples/errs/misspell.sgm"/> +</programlisting> +<screen> +[n:\documents\books\dbtdg]nsgmls -sv -c \share\sgml\catalog examples\errs\misspe +ll.sgm +m:\jade\nsgmls.exe:I: SP version "1.3.2" +m:\jade\nsgmls.exe:examples\errs\misspell.sgm:9:5:E: element "PAAR" undefined +m:\jade\nsgmls.exe:examples\errs\misspell.sgm:14:6:E: end tag for element "PARA" which is not open +m:\jade\nsgmls.exe:examples\errs\misspell.sgm:21:9:E: end tag for "PAAR" omitted, but OMITTAG NO was specified +m:\jade\nsgmls.exe:examples\errs\misspell.sgm:9:0: start tag was here +</screen> +<para> +Luckily, these are pretty easy to spot, unless you accidentally spell +the name of another element. In that case, your error might appear to +be out of context. +</para> +</sect2> +<sect2><title>Misspelled End Tag</title> +<para> +<indexterm><primary>end tags</primary> + <secondary>errors, misspelling</secondary></indexterm> + +Spelling the end tag wrong is just as confusing. +</para> +<programlisting> +<inlinegraphic format="linespecific" fileref="examples/errs/misspell2.sgm"/> +</programlisting> +<screen> +[n:\dbtdg]nsgmls -sv -c \share\sgml\catalog examples\errs\misspell2.sgm +m:\jade\nsgmls.exe:I: SP version "1.3.2" +m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:2:35:E: end tag for element "TITEL" which is not open +m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:3:5:E: document type does not allow element "PARA" here; missing one of "FOOTNOTE", "MSGTEXT" start-tag +m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:9:5:E: document type does not allow element "PARA" here; missing one of "FOOTNOTE", "MSGTEXT" start-tag +m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:15:5:E: document type does not allow element "PARA" here; missing one of "FOOTNOTE", "MSGTEXT" start-tag +m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:21:9:E: end tag for "TITLE" omitted, but OMITTAG NO was specified +m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:2:9: start tag was here +m:\jade\nsgmls.exe:examples\errs\misspell2.sgm:21:9:E: end tag for "CHAPTER" which is not finished +</screen> +<para> +These are pretty easy to spot as well, but look at how confused the +parser became. From the parser's point of view, failure to close the +open <sgmltag>Title</sgmltag> element means that all the following elements +appear out of context. +</para> +</sect2> +<sect2><title>Out of Context Start Tag</title> +<para> +<indexterm><primary>start tags</primary> + <secondary>errors</secondary> + <tertiary>out of context</tertiary></indexterm> +<indexterm><primary>tags</primary> + <secondary>context errors</secondary></indexterm> + +Sometimes the problem isn't spelling, but placing a tag in the wrong +context. When this happens, the parser tries to figure out what it +can add to your document to make it valid. Then it proceeds as if it +had seen what was added in order to recover from the error seen, which +can cause future errors. +</para> +<programlisting> +<inlinegraphic format="linespecific" fileref="examples/errs/badstarttag.sgm"/> +</programlisting> +<screen> +[n:\dbtdg]nsgmls -sv -c \share\sgml\catalog examples\errs\badstarttag.sgm +m:\jade\nsgmls.exe:I: SP version "1.3.2" +m:\jade\nsgmls.exe:examples\errs\badstarttag.sgm:9:12:E: document type does not allow element "TITLE" here; missing one of "CALLOUTLIST", "SEGMENTEDLIST", "VARIABLELIST", "CAUTION", "IMPORTANT", "NOTE", "TIP", "WARNING", "BLOCKQUOTE", "EQUATION", "EXAMPLE", "FIGURE", "TABLE" start-tag +</screen> +<para> +<indexterm><primary>titles</primary> + <secondary>formal elements</secondary> + <tertiary>errors</tertiary></indexterm> +<indexterm><primary>paragraphs</primary> + <secondary>titles</secondary></indexterm> + +In this example, we probably wanted a <sgmltag>FormalPara</sgmltag>, so that +we could have a title on the paragraph. But note that the parser +didn't suggest this alternative. The parser only tries to add +additional elements, rather than rename elements that it's already +seen. +</para> +</sect2> +<sect2><title>Missing End Tag</title> +<para> +<indexterm><primary>end tags</primary> + <secondary>missing, errors</secondary></indexterm> + +Leaving out an end tag is a lot like an out of context start tag. In +fact, they're really the same error. The problem is never caused by +the missing end tag per se, rather it's caused by the fact that +something following it is now out of context. +</para> +<programlisting> +<inlinegraphic format="linespecific" fileref="examples/errs/noendtag.sgm"/> +</programlisting> +<screen> +[n:\dbtdg]nsgmls -sv -c \share\sgml\catalog examples\errs\noendtag.sgm +m:\jade\nsgmls.exe:I: SP version "1.3.2" +m:\jade\nsgmls.exe:examples\errs\noendtag.sgm:14:5:E: document type does not allow element "PARA" here; missing one of "FOOTNOTE", "MSGTEXT", "CAUTION", "IMPORTANT", "NOTE", "TIP", "WARNING", "BLOCKQUOTE", "INFORMALEXAMPLE" start-tag +m:\jade\nsgmls.exe:examples\errs\noendtag.sgm:20:9:E: end tag for "PARA" omitted, but OMITTAG NO was specified +m:\jade\nsgmls.exe:examples\errs\noendtag.sgm:9:0: start tag was here +</screen> +<para> +In this case, the parser figured out that the best thing it could do +is end the paragraph. +</para> +</sect2> +<sect2><title>Bad Entity Reference</title> +<para> +<indexterm><primary>entities</primary> + <secondary>errors, spelling</secondary></indexterm> + +If you spell an entity name wrong, the parser will catch it. +</para> +<programlisting> +<inlinegraphic format="linespecific" fileref="examples/errs/badent.sgm"/> +</programlisting> +<screen> +[n:\dbtdg]nsgmls -sv -c \share\sgml\catalog examples\errs\badent.sgm +m:\jade\nsgmls.exe:I: SP version "1.3.2" +m:\jade\nsgmls.exe:examples\errs\badent.sgm:10:26:E: general entity "xyzzy" not defined and no default entity +</screen> +<para> +More often than not, you'll see this when you misspell a character +entity name. For example, this happens when you type +<literal>&ldqou;</literal> instead of +<literal>&ldquo;</literal>. +</para> +</sect2> +<sect2><title>Invalid 8-Bit Character</title> +<para> +<indexterm><primary>characters</primary> + <secondary>character sets</secondary> + <tertiary>Unicode character set (SGML errors)</tertiary></indexterm> +<indexterm><primary>8-bit characters, errors (SGML)</primary></indexterm> +<indexterm><primary>errors</primary> + <secondary>8-bit characters (SGML)</secondary></indexterm> + +In XML, the entire range of Unicode characters is available to you, +but in SGML, the declaration indicates what characters are valid. +The distributed DocBook declaration doesn't allow a bunch of fairly +common 8-bit characters. +</para> +<programlisting> +<inlinegraphic format="linespecific" fileref="examples/errs/badchar.sgm"/> +</programlisting> +<screen> +[n:\dbtdg]nsgmls -sv -c \share\sgml\catalog examples\errs\badchar.sgm +m:\jade\nsgmls.exe:I: SP version "1.3.2" +m:\jade\nsgmls.exe:examples\errs\badchar.sgm:11:0:E: non SGML character number 147 +m:\jade\nsgmls.exe:examples\errs\badchar.sgm:11:5:E: non SGML character number 148 +</screen> +<para> +<indexterm><primary>declarations</primary> + <secondary>character sets, errors</secondary></indexterm> +<indexterm><primary>entities</primary> + <secondary>characters</secondary> + <tertiary>errors</tertiary></indexterm> + +In this example, the Windows code page values for +curly left and right quotes have been used, but they aren't in the +declared character set. Fix this by converting them to character +entities. +</para> +<para> +<indexterm><primary>interchange partners</primary></indexterm> + +You can also fix them by changing the declaration, but if you do that, +make sure all your interchange partners are aware of, and have a copy of, +the modified declaration. See <xref linkend="app-interchange"/>. +<indexterm startref="errorparsech4" class="endofrange"/> +<indexterm startref="parsDocch4" class="endofrange"/> +<indexterm startref="docDTDparsch4" class="endofrange"/> +</para> +</sect2> +</sect1> + +<sect1 id="ch03-otherschema"><title>Considering Other Schema Languages</title> + +<para>Historically, DTDs were the only way to describe the valid +stricture of SGML and XML documents, but that is no longer the case. +At the time of this writing (January, 2001), DocBook is experimentally +available in three other schema languages:</para> + +<variablelist> +<varlistentry> +<term><ulink url="http://www.w3.org/XML/Schema">XML Schema</ulink></term> +<listitem> +<para>The schema language being defined by the +<ulink url="http://www.w3.org/">W3C</ulink> as the successor to DTDs +for describing the structure of XML. XML Schema are likely to become +a <ulink url="http://www.w3.org/">W3C</ulink> Recommendation in 2001. +</para></listitem> +</varlistentry> +<varlistentry> +<term><ulink url="http://www.xml.gr.jp/relax/">RELAX</ulink></term> +<listitem> +<para>RELAX, the Regular Language description for XML) is a less +complex alternative to XML Schemas. The RELAX Core module is defined by +ISO in <citetitle>ISO/IEC DTR 22250-1, Document Description and +Processing Languages -- Regular Language Description for XML (RELAX) +-- Part 1: RELAX Core, 2000</citetitle>. The RELAX Namespaces module +is currently under development. +</para> +</listitem> +</varlistentry> +<varlistentry> +<term><ulink url="http://www.thaiopensource.com/trex/">TREX</ulink></term> +<listitem> +<para>TREX, Tree Regular Expressions for XML, is another less complex +alternative to XML Schemas. It is concise, powerful, and datatype +neutral.</para> +</listitem> +</varlistentry> +</variablelist> + +<sect2><title>Parsing and Validation</title> + +<para>Before we look closer at these new schema languages, there's one +significant difference between DTDs and all of them that we should +get out of the way: XML parsers (which may understand DTDs) build an +XML information set out of a stream of characters, all of these other +schema languages begin with an information set and perform validation +on it.</para> + +<para>What I mean by that is that an XML parser reads a stream of +bytes: + +<screen>"<" "?" "x" "m" "l" " " "v" "e" ... +"<" "!" "D" "O" "C" "T" "Y" "P" "E" " " "b" "o" "o" "k" ... +"<" "b" "o" "o" "k" " " "i" "d" "=" "'" "f" "o" "o" "'" ">" +... +"<" "/" "b" "o" "o" "k" ">"</screen> + +interprets them as a stream of characters (which may change the +interpretation of some sequences of bytes) and constructs some +representation of the XML document. This representation is the set +of all the XML information items encountered: the information +set of the document. The <ulink url="http://www.w3.org/">W3C</ulink> +<ulink url="http://www.w3.org/XML/">XML Core Working Group</ulink> +is in the process of defining what an +<ulink url="http://www.w3.org/TR/xml-infoset">XML Information Set</ulink> +contains.</para> + +<para>The other schema languages are defined not in terms of the sequence +of characters in the file but in terms of the information set of the +XML document. They have to work this way because the +<ulink url="http://www.w3.org/TR/REC-xml">XML Recommendation</ulink> +says what an XML document is and they all want to work on top of +XML.</para> + +<para>So what, you might ask? Well, it turns out that this has at least +one very significant implication: there's no way for these languages to +provide support for entity declarations.</para> + +<para>An entity, like <quote><literal>&ora;</literal></quote> +as a shortcut for <quote>O'Reilly & Associates</quote> or +<quote><literal>&eacute;</literal></quote> as a mnemonic for +<quote>é</quote>, is a feature of the character stream seen by +the XML parser, it doesn't exist in the information set of valid +XML documents. More importantly, this means that even if the schema +language had a syntax for declaring entities, it wouldn't help the XML +parser that needs to know the definitions long before the schema language +processor comes into play.</para> + +<para>There are a couple of other XML features that are impacted, +though not necessarily as significantly: notations and default +attribute values. One use for notations is on external entity +declarations, and as we've already seen, the schema language is too +late to be useful for anything entity related. Default attribute values +are also problematic since you would like them to be in the information +set produced by the parser so that the schema language sees them.</para> + +</sect2> + +<sect2><title>A Coarse Comparison of Three XML Schema Languages</title> + +<para>FIXME: write a short synopsis of how these languages compare.</para> + +</sect2> + +</sect1> +</chapter> Modified: branches/xsl2-phases/docbook/simple/Makefile =================================================================== --- trunk/docbook/simple/Makefile 2007-12-14 19:17:04 UTC (rev 7605) +++ branches/xsl2-phases/docbook/simple/Makefile 2007-12-16 18:36:22 UTC (rev 7616) @@ -1,5 +1,6 @@ include ../../buildtools/Makefile.incl +XJPARSE=/home/ndw/bin/xjparse MODULES=sdbcent.mod sdbhier.mod sdbpool.mod sinclist.mod VERSION= FMGO=-N This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nw...@us...> - 2007-12-28 17:04:13
|
Revision: 7627 http://docbook.svn.sourceforge.net/docbook/?rev=7627&view=rev Author: nwalsh Date: 2007-12-28 09:04:09 -0800 (Fri, 28 Dec 2007) Log Message: ----------- Another experiment Modified Paths: -------------- branches/xsl2-namedt/docbook/simple/Makefile branches/xsl2-namedt/xsl-saxon/nbproject/build-impl.xml branches/xsl2-namedt/xsl-saxon/nbproject/genfiles.properties branches/xsl2-namedt/xsl-saxon/nbproject/project.properties branches/xsl2-namedt/xsl-saxon/nbproject/project.xml Added Paths: ----------- branches/xsl2-namedt/ Copied: branches/xsl2-namedt (from rev 7626, trunk) Modified: branches/xsl2-namedt/docbook/simple/Makefile =================================================================== --- trunk/docbook/simple/Makefile 2007-12-28 04:49:48 UTC (rev 7626) +++ branches/xsl2-namedt/docbook/simple/Makefile 2007-12-28 17:04:09 UTC (rev 7627) @@ -1,5 +1,6 @@ include ../../buildtools/Makefile.incl +XJPARSE=/home/ndw/bin/xjparse MODULES=sdbcent.mod sdbhier.mod sdbpool.mod sinclist.mod VERSION= FMGO=-N Modified: branches/xsl2-namedt/xsl-saxon/nbproject/build-impl.xml =================================================================== --- trunk/xsl-saxon/nbproject/build-impl.xml 2007-12-28 04:49:48 UTC (rev 7626) +++ branches/xsl2-namedt/xsl-saxon/nbproject/build-impl.xml 2007-12-28 17:04:09 UTC (rev 7627) @@ -18,62 +18,35 @@ - applet - cleanup ---> -<project name="saxon65-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1"> - <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/> + --> +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="saxon65-impl"> + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> + ====================== + INITIALIZATION SECTION + ====================== + --> <target name="-pre-init"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="-init-private" depends="-pre-init"> + <target depends="-pre-init" name="-init-private"> + <property file="nbproject/private/config.properties"/> + <property file="nbproject/private/configs/${config}.properties"/> <property file="nbproject/private/private.properties"/> </target> - <target name="-init-user" depends="-pre-init,-init-private"> + <target depends="-pre-init,-init-private" name="-init-user"> <property file="${user.properties.file}"/> <!-- The two properties below are usually overridden --> <!-- by the active platform. Just a fallback. --> <property name="default.javac.source" value="1.4"/> <property name="default.javac.target" value="1.4"/> </target> - <target name="-init-project" depends="-pre-init,-init-private,-init-user"> + <target depends="-pre-init,-init-private,-init-user" name="-init-project"> + <property file="nbproject/configs/${config}.properties"/> <property file="nbproject/project.properties"/> </target> - <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property"> - <j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/> - <j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/> - <j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/> - <j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/> - <condition property="platform.javac" value="${platform.home}/bin/javac"> - <equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/> - </condition> - <property name="platform.javac" value="${platform.javac.tmp}"/> - <j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/> - <condition property="platform.java" value="${platform.home}/bin/java"> - <equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/> - </condition> - <property name="platform.java" value="${platform.java.tmp}"/> - <j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/> - <condition property="platform.javadoc" value="${platform.home}/bin/javadoc"> - <equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/> - </condition> - <property name="platform.javadoc" value="${platform.javadoc.tmp}"/> - <condition property="platform.invalid" value="true"> - <or> - <contains string="${platform.javac}" substring="$${platforms."/> - <contains string="${platform.java}" substring="$${platforms."/> - <contains string="${platform.javadoc}" substring="$${platforms."/> - </or> - </condition> - <fail unless="platform.home">Must set platform.home</fail> - <fail unless="platform.bootcp">Must set platform.bootcp</fail> - <fail unless="platform.java">Must set platform.java</fail> - <fail unless="platform.javac">Must set platform.javac</fail> - <fail if="platform.invalid">Platform is not correctly set up</fail> + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> <available file="${manifest.file}" property="manifest.available"/> <condition property="manifest.available+main.class"> <and> @@ -107,7 +80,10 @@ </and> </condition> <condition property="no.javadoc.preview"> - <isfalse value="${javadoc.preview}"/> + <and> + <isset property="javadoc.preview"/> + <isfalse value="${javadoc.preview}"/> + </and> </condition> <property name="run.jvmargs" value=""/> <property name="javac.compilerargs" value=""/> @@ -119,12 +95,35 @@ </condition> <property name="javac.debug" value="true"/> <property name="javadoc.preview" value="true"/> + <property name="application.args" value=""/> + <property name="source.encoding" value="${file.encoding}"/> + <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> + <and> + <isset property="javadoc.encoding"/> + <not> + <equals arg1="${javadoc.encoding}" arg2=""/> + </not> + </and> + </condition> + <property name="javadoc.encoding.used" value="${source.encoding}"/> + <property name="includes" value="**"/> + <property name="excludes" value=""/> + <property name="do.depend" value="false"/> + <condition property="do.depend.true"> + <istrue value="${do.depend}"/> + </condition> + <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'"> + <and> + <isset property="jaxws.endorsed.dir"/> + <available file="nbproject/jaxws-build.xml"/> + </and> + </condition> </target> <target name="-post-init"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init"> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> <fail unless="src.dir">Must set src.dir</fail> <fail unless="test.src.dir">Must set test.src.dir</fail> <fail unless="build.dir">Must set build.dir</fail> @@ -147,36 +146,70 @@ </target> <target name="-init-macrodef-javac"> <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute name="srcdir" default="${src.dir}"/> - <attribute name="destdir" default="${build.classes.dir}"/> - <attribute name="classpath" default="${javac.classpath}"/> - <attribute name="debug" default="${javac.debug}"/> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="" name="sourcepath"/> <element name="customize" optional="true"/> <sequential> - <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" fork="yes" executable="${platform.javac}" tempdir="${java.io.tmpdir}" includeantruntime="false"> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}"> <classpath> <path path="@{classpath}"/> </classpath> - <compilerarg line="${javac.compilerargs}"/> + <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/> <customize/> </javac> </sequential> </macrodef> + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <sequential> + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </depend> + </sequential> + </macrodef> + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${build.classes.dir}" name="destdir"/> + <sequential> + <fail unless="javac.includes">Must set javac.includes</fail> + <pathconvert pathsep="," property="javac.includes.binary"> + <path> + <filelist dir="@{destdir}" files="${javac.includes}"/> + </path> + <globmapper from="*.java" to="*.class"/> + </pathconvert> + <delete> + <files includes="${javac.includes.binary}"/> + </delete> + </sequential> + </macrodef> </target> <target name="-init-macrodef-junit"> <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute name="includes" default="**/*Test.java"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> <sequential> - <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed" jvm="${platform.java}"> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true"> <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" includes="@{includes}"/> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> </batchtest> <classpath> <path path="${run.test.classpath}"/> </classpath> <syspropertyset> <propertyref prefix="test-sys-prop."/> - <mapper type="glob" from="test-sys-prop.*" to="*"/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> </syspropertyset> <formatter type="brief" usefile="false"/> <formatter type="xml"/> @@ -187,39 +220,48 @@ </target> <target name="-init-macrodef-nbjpda"> <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name" default="${main.class}"/> - <attribute name="classpath" default="${debug.classpath}"/> - <attribute name="stopclassname" default=""/> + <attribute default="${main.class}" name="name"/> + <attribute default="${debug.classpath}" name="classpath"/> + <attribute default="" name="stopclassname"/> <sequential> - <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}"> + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket"> <classpath> <path path="@{classpath}"/> </classpath> - <bootclasspath> - <path path="${platform.bootcp}"/> - </bootclasspath> </nbjpdastart> </sequential> </macrodef> <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="dir" default="${build.classes.dir}"/> + <attribute default="${build.classes.dir}" name="dir"/> <sequential> <nbjpdareload> - <fileset includes="${fix.includes}*.class" dir="@{dir}"/> + <fileset dir="@{dir}" includes="${fix.includes}*.class"/> </nbjpdareload> </sequential> </macrodef> </target> - <target name="-init-macrodef-debug"> + <target name="-init-debug-args"> + <property name="version-output" value="java version "${ant.java.version}"/> + <condition property="have-jdk-older-than-1.4"> + <or> + <contains string="${version-output}" substring="java version "1.0"/> + <contains string="${version-output}" substring="java version "1.1"/> + <contains string="${version-output}" substring="java version "1.2"/> + <contains string="${version-output}" substring="java version "1.3"/> + </or> + </condition> + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> + <istrue value="${have-jdk-older-than-1.4}"/> + </condition> + </target> + <target depends="-init-debug-args" name="-init-macrodef-debug"> <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute name="classname" default="${main.class}"/> - <attribute name="classpath" default="${debug.classpath}"/> + <attribute default="${main.class}" name="classname"/> + <attribute default="${debug.classpath}" name="classpath"/> <element name="customize" optional="true"/> <sequential> - <java fork="true" classname="@{classname}" dir="${work.dir}" jvm="${platform.java}"> - <jvmarg value="-Xdebug"/> - <jvmarg value="-Xnoagent"/> - <jvmarg value="-Djava.compiler=none"/> + <java classname="@{classname}" dir="${work.dir}" fork="true"> + <jvmarg line="${debug-args-line}"/> <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/> <jvmarg line="${run.jvmargs}"/> <classpath> @@ -227,7 +269,7 @@ </classpath> <syspropertyset> <propertyref prefix="run-sys-prop."/> - <mapper type="glob" from="run-sys-prop.*" to="*"/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> </syspropertyset> <customize/> </java> @@ -236,17 +278,17 @@ </target> <target name="-init-macrodef-java"> <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="classname" default="${main.class}"/> + <attribute default="${main.class}" name="classname"/> <element name="customize" optional="true"/> <sequential> - <java fork="true" classname="@{classname}" dir="${work.dir}" jvm="${platform.java}"> + <java classname="@{classname}" dir="${work.dir}" fork="true"> <jvmarg line="${run.jvmargs}"/> <classpath> <path path="${run.classpath}"/> </classpath> <syspropertyset> <propertyref prefix="run-sys-prop."/> - <mapper type="glob" from="run-sys-prop.*" to="*"/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> </syspropertyset> <customize/> </java> @@ -255,102 +297,102 @@ </target> <target name="-init-presetdef-jar"> <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar jarfile="${dist.jar}" compress="${jar.compress}"> + <jar compress="${jar.compress}" jarfile="${dist.jar}"> <j2seproject1:fileset dir="${build.classes.dir}"/> </jar> </presetdef> </target> - <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/> <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="deps-jar" depends="init" unless="no.deps"/> - <target name="-pre-pre-compile" depends="init,deps-jar"> + =================== + COMPILATION SECTION + =================== + --> + <target depends="init" name="deps-jar" unless="no.deps"/> + <target depends="init,deps-jar" name="-pre-pre-compile"> <mkdir dir="${build.classes.dir}"/> </target> <target name="-pre-compile"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources"> + <target if="do.depend.true" name="-compile-depend"> + <j2seproject3:depend/> + </target> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile"> <j2seproject3:javac/> <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/> + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> </copy> </target> <target name="-post-compile"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> <target name="-pre-compile-single"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile"> + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:javac> - <customize> - <patternset includes="${javac.includes}"/> - </customize> - </j2seproject3:javac> + <j2seproject3:force-recompile/> + <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/> </target> <target name="-post-compile-single"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target name="-pre-pre-jar" depends="init"> - <dirname property="dist.jar.dir" file="${dist.jar}"/> + ==================== + JAR BUILDING SECTION + ==================== + --> + <target depends="init" name="-pre-pre-jar"> + <dirname file="${dist.jar}" property="dist.jar.dir"/> <mkdir dir="${dist.jar.dir}"/> </target> <target name="-pre-jar"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available"> + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available"> <j2seproject1:jar/> </target> - <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class"> + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class"> <j2seproject1:jar manifest="${manifest.file}"/> </target> - <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available"> + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available"> <j2seproject1:jar manifest="${manifest.file}"> <j2seproject1:manifest> <j2seproject1:attribute name="Main-Class" value="${main.class}"/> </j2seproject1:manifest> </j2seproject1:jar> <echo>To run this application from the command line without Ant, try:</echo> - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/> - <property name="dist.jar.resolved" location="${dist.jar}"/> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <property location="${dist.jar}" name="dist.jar.resolved"/> <pathconvert property="run.classpath.with.dist.jar"> <path path="${run.classpath}"/> <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> </pathconvert> - <echo>${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> + <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> </target> - <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available"> - <property name="build.classes.dir.resolved" location="${build.classes.dir}"/> + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries"> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> <pathconvert property="run.classpath.without.build.classes.dir"> <path path="${run.classpath}"/> <map from="${build.classes.dir.resolved}" to=""/> </pathconvert> - <pathconvert property="jar.classpath" pathsep=" "> + <pathconvert pathsep=" " property="jar.classpath"> <path path="${run.classpath.without.build.classes.dir}"/> <chainedmapper> <flattenmapper/> <globmapper from="*" to="lib/*"/> </chainedmapper> </pathconvert> - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/> - <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}"> + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> <fileset dir="${build.classes.dir}"/> <manifest> <attribute name="Main-Class" value="${main.class}"/> @@ -358,183 +400,194 @@ </manifest> </copylibs> <echo>To run this application from the command line without Ant, try:</echo> - <property name="dist.jar.resolved" location="${dist.jar}"/> - <echo>${platform.java} -jar "${dist.jar.resolved}"</echo> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <echo>java -jar "${dist.jar.resolved}"</echo> </target> <target name="-post-jar"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/> + <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/> <!-- - ================= - EXECUTION SECTION - ================= - --> - <target name="run" depends="init,compile" description="Run a main class."> + ================= + EXECUTION SECTION + ================= + --> + <target depends="init,compile" description="Run a main class." name="run"> <j2seproject1:java> <customize> <arg line="${application.args}"/> </customize> </j2seproject1:java> </target> - <target name="run-single" depends="init,compile-single"> + <target name="-do-not-recompile"> + <property name="javac.includes.binary" value=""/> + </target> + <target depends="init,-do-not-recompile,compile-single" name="run-single"> <fail unless="run.class">Must select one file in the IDE or set run.class</fail> <j2seproject1:java classname="${run.class}"/> </target> <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target name="-debug-start-debugger" if="netbeans.home" depends="init"> + ================= + DEBUGGING SECTION + ================= + --> + <target depends="init" if="netbeans.home" name="-debug-start-debugger"> <j2seproject1:nbjpdastart name="${debug.class}"/> </target> - <target name="-debug-start-debuggee" depends="init,compile"> + <target depends="init,compile" name="-debug-start-debuggee"> <j2seproject3:debug> <customize> <arg line="${application.args}"/> </customize> </j2seproject3:debug> </target> - <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/> - <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init"> + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> <j2seproject1:nbjpdastart stopclassname="${main.class}"/> </target> - <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/> - <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single"> + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> <j2seproject3:debug classname="${debug.class}"/> </target> - <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/> - <target name="-pre-debug-fix" depends="init"> + <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> + <target depends="init" name="-pre-debug-fix"> <fail unless="fix.includes">Must set fix.includes</fail> <property name="javac.includes" value="${fix.includes}.java"/> </target> - <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single"> + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> <j2seproject1:nbjpdareload/> </target> - <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/> + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> <!-- - =============== - JAVADOC SECTION - =============== - --> - <target name="-javadoc-build" depends="init"> + =============== + JAVADOC SECTION + =============== + --> + <target depends="init" name="-javadoc-build"> <mkdir dir="${dist.javadoc.dir}"/> - <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true" executable="${platform.javadoc}"> + <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> <classpath> <path path="${javac.classpath}"/> </classpath> - <sourcepath> - <pathelement location="${src.dir}"/> - </sourcepath> - <packageset dir="${src.dir}" includes="*/**"/> - <fileset dir="${src.dir}" includes="*.java"/> + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> </javadoc> </target> - <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build"> + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> <nbbrowse file="${dist.javadoc.dir}/index.html"/> </target> - <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/> + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> <!-- - ========================= - JUNIT COMPILATION SECTION - ========================= - --> - <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile"> + ========================= + JUNIT COMPILATION SECTION + ========================= + --> + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> <mkdir dir="${build.test.classes.dir}"/> </target> <target name="-pre-compile-test"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test"> - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/> + <target if="do.depend.true" name="-compile-test-depend"> + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="**/*.java"/> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> </copy> </target> <target name="-post-compile-test"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> <target name="-pre-compile-test-single"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single"> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"> - <customize> - <patternset includes="${javac.includes}"/> - </customize> - </j2seproject3:javac> + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="**/*.java"/> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> </copy> </target> <target name="-post-compile-test-single"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> <!-- - ======================= - JUNIT EXECUTION SECTION - ======================= - --> - <target name="-pre-test-run" if="have.tests" depends="init"> + ======================= + JUNIT EXECUTION SECTION + ======================= + --> + <target depends="init" if="have.tests" name="-pre-test-run"> <mkdir dir="${build.test.results.dir}"/> </target> - <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run"> - <j2seproject3:junit/> + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> + <j2seproject3:junit testincludes="**/*Test.java"/> </target> - <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run"> + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> <fail if="tests.failed">Some tests failed; see details above.</fail> </target> - <target name="test-report" if="have.tests" depends="init"/> - <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/> - <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/> - <target name="-pre-test-run-single" if="have.tests" depends="init"> + <target depends="init" if="have.tests" name="test-report"/> + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> + <target depends="init" if="have.tests" name="-pre-test-run-single"> <mkdir dir="${build.test.results.dir}"/> </target> - <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single"> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:junit includes="${test.includes}"/> + <j2seproject3:junit excludes="" includes="${test.includes}"/> </target> - <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single"> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> <fail if="tests.failed">Some tests failed; see details above.</fail> </target> - <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/> + <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> <!-- - ======================= - JUNIT DEBUGGING SECTION - ======================= - --> - <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test"> + ======================= + JUNIT DEBUGGING SECTION + ======================= + --> + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}"> + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/> + <delete file="${test.report.file}"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}"> <customize> - <arg line="${test.class}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <arg value="${test.class}"/> + <arg value="showoutput=true"/> + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/> + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/> </customize> </j2seproject3:debug> </target> - <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test"> - <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/> + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> </target> - <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/> - <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single"> + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> </target> - <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/> + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target name="run-applet" depends="init,compile-single"> + ========================= + APPLET EXECUTION SECTION + ========================= + --> + <target depends="init,compile-single" name="run-applet"> <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> <j2seproject1:java classname="sun.applet.AppletViewer"> <customize> @@ -543,11 +596,11 @@ </j2seproject1:java> </target> <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single"> + ========================= + APPLET DEBUGGING SECTION + ========================= + --> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> <j2seproject3:debug classname="sun.applet.AppletViewer"> <customize> @@ -555,21 +608,20 @@ </customize> </j2seproject3:debug> </target> - <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="deps-clean" depends="init" unless="no.deps"/> - <target name="-do-clean" depends="init"> - <delete file="${dist.jar}"/> - <delete dir="${dist.javadoc.dir}"/> - <delete dir="${build.classes.dir}"/> + =============== + CLEANUP SECTION + =============== + --> + <target depends="init" name="deps-clean" unless="no.deps"/> + <target depends="init" name="-do-clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}"/> </target> <target name="-post-clean"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/> + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> </project> Modified: branches/xsl2-namedt/xsl-saxon/nbproject/genfiles.properties =================================================================== --- trunk/xsl-saxon/nbproject/genfiles.properties 2007-12-28 04:49:48 UTC (rev 7626) +++ branches/xsl2-namedt/xsl-saxon/nbproject/genfiles.properties 2007-12-28 17:04:09 UTC (rev 7627) @@ -1,8 +1,8 @@ -build.xml.data.CRC32=8e458dcb +build.xml.data.CRC32=fe057db0 build.xml.script.CRC32=c0233ac0 -build.xml.stylesheet.CRC32=d5b6853a +build.xml.stylesheet.CRC32=be360661 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=8e458dcb -nbproject/build-impl.xml.script.CRC32=39e8d752 -nbproject/build-impl.xml.stylesheet.CRC32=99b91518 +nbproject/build-impl.xml.data.CRC32=fe057db0 +nbproject/build-impl.xml.script.CRC32=2a99d635 +nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08 Modified: branches/xsl2-namedt/xsl-saxon/nbproject/project.properties =================================================================== --- trunk/xsl-saxon/nbproject/project.properties 2007-12-28 04:49:48 UTC (rev 7626) +++ branches/xsl2-namedt/xsl-saxon/nbproject/project.properties 2007-12-28 17:04:09 UTC (rev 7627) @@ -1,4 +1,6 @@ application.args= +application.title=saxon65 +application.vendor=ndw build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form build.dir=. @@ -15,15 +17,17 @@ # This jar file and javadoc are removed when the project is cleaned. dist.jar=${dist.dir}/saxon65.jar dist.javadoc.dir=${dist.dir}/javadoc +excludes= file.reference.saxon.jar=../../../../../usr/local/java/saxon6/saxon.jar +includes=** jar.compress=false javac.classpath=\ ${file.reference.saxon.jar} # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false -javac.source=1.4 -javac.target=1.4 +javac.source=1.5 +javac.target=1.5 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ @@ -40,7 +44,7 @@ javadoc.version=false javadoc.windowtitle= meta.inf.dir=${src.dir}/META-INF -platform.active=Java_HotSpot_TM__Client_VM_1.4.2_11-b06 +platform.active=default_platform run.classpath=\ ${javac.classpath}:\ ${build.classes.dir} Modified: branches/xsl2-namedt/xsl-saxon/nbproject/project.xml =================================================================== --- trunk/xsl-saxon/nbproject/project.xml 2007-12-28 04:49:48 UTC (rev 7626) +++ branches/xsl2-namedt/xsl-saxon/nbproject/project.xml 2007-12-28 17:04:09 UTC (rev 7627) @@ -5,7 +5,6 @@ <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> <name>saxon65</name> <minimum-ant-version>1.6.5</minimum-ant-version> - <explicit-platform explicit-source-supported="true"/> <source-roots> <root id="src.dir"/> </source-roots> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |