Diff for /books/www/chapters/ch10.html between versions 1.2 and 1.6

version 1.2, 2002/09/23 15:23:31 version 1.6, 2002/11/27 13:20:25
Line 986  Example 10-14<A NAME="77052"></A> Line 986  Example 10-14<A NAME="77052"></A>
   
 <P><A HREF="#77052">Example 10-14</A> contains a modified version of the <TT>update</TT> function. First, the function checks to see if a sequence called <TT>types</TT> is in the RDF file. If not, it creates one. Next, it appends an item to the sequence using <TT>type:_+(seqLength+1)</TT>. The same type of container setup was described in the section <A HREF="#77104">"nsIRDFContainer</A>," earlier in this chapter.  <P><A HREF="#77052">Example 10-14</A> contains a modified version of the <TT>update</TT> function. First, the function checks to see if a sequence called <TT>types</TT> is in the RDF file. If not, it creates one. Next, it appends an item to the sequence using <TT>type:_+(seqLength+1)</TT>. The same type of container setup was described in the section <A HREF="#77104">"nsIRDFContainer</A>," earlier in this chapter.
 <P>The <TT>update</TT> function then adds the color, quantity, and "dead" properties of that new item in the sequence. Next, it ensures that you actually want to add the item to the RDF file and flushes it out if not. It then recalls the <TT>onload</TT> function to update the template display.  <P>The <TT>update</TT> function then adds the color, quantity, and "dead" properties of that new item in the sequence. Next, it ensures that you actually want to add the item to the RDF file and flushes it out if not. It then recalls the <TT>onload</TT> function to update the template display.
<P>These are the basics of using <TT>RDFFile</TT>. As you can see, using JSLib for RDF is often much easier than trying to implement a similar setup on your own. More information about <TT>RDFFile</TT> and the other JSLib libraries can  <!--INDEX web sites:JSLib --> be <!--INDEX ENDRANGE--RDF (Resource Description Framework):files:JSLib -->  <!--INDEX ENDRANGE--JSLib libraries:RDF files -->  <!--INDEX ENDRANGE--files:RDF:JSLib -->  found at <I><A HREF="http://www.jslib.mozdev.org/">http://www.jslib.mozdev.org/</A></I>.<P>These are the basics of using <TT>RDFFile</TT>. As you can see, using JSLib for RDF is often much easier than trying to implement a similar setup on your own. More information about <TT>RDFFile</TT> and the other JSLib libraries can  <!--INDEX web sites:JSLib --> be <!--INDEX ENDRANGE--RDF (Resource Description Framework):files:JSLib -->  <!--INDEX ENDRANGE--JSLib libraries:RDF files -->  <!--INDEX ENDRANGE--files:RDF:JSLib -->  found at <I><A HREF="http://jslib.mozdev.org/">http://jslib.mozdev.org/</A></I>.
 <H2><A NAME="77113"></A> Manifests</H2>  <H2><A NAME="77113"></A> Manifests</H2>
 <P>The package  <!--INDEX RDF (Resource Description Framework):manifest files -->  <!--INDEX manifests:RDF --> descriptions, generally called <I>manifests</I>, use RDF to describe new packages and files to Mozilla. They can be added seamlessly because RDF provides a platform-like environment that facilitates the installation and use of new Mozilla software.  <P>The package  <!--INDEX RDF (Resource Description Framework):manifest files -->  <!--INDEX manifests:RDF --> descriptions, generally called <I>manifests</I>, use RDF to describe new packages and files to Mozilla. They can be added seamlessly because RDF provides a platform-like environment that facilitates the installation and use of new Mozilla software.
 <P>All packages, including the ones that come preinstalled with Mozilla (such as the browser, the MailNews component, and the en-US language pack), have manifests describing them in terms of their relation to other packages. The manifests are typically files called <I>contents.rdf</I>, but they may also be called <I>manifest.rdf</I>. <A HREF="#77054">Example 10-15</A> presents a <I>contents.rdf</I> file that describes a new skin for Mozilla.  <P>All packages, including the ones that come preinstalled with Mozilla (such as the browser, the MailNews component, and the en-US language pack), have manifests describing them in terms of their relation to other packages. The manifests are typically files called <I>contents.rdf</I>, but they may also be called <I>manifest.rdf</I>. <A HREF="#77054">Example 10-15</A> presents a <I>contents.rdf</I> file that describes a new skin for Mozilla.
Line 1074  Example 10-17<A NAME="77058"></A> Line 1074  Example 10-17<A NAME="77058"></A>
 A vector, for those who don't know, is a flexible and  A vector, for those who don't know, is a flexible and
 more accessible version of the array data structure.  more accessible version of the array data structure.
 <HR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>  <HR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR></BODY><!-- ?php require(NOTES); ? -->
 <?php $post_to_list=NO; $author='reviewers@mozdev.org'; $target_page='ch10'; require(NOTES); ?>
 </BODY>
 </HTML>  </HTML>

Removed from v.1.2  
changed lines
  Added in v.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>