XML
  Home arrow XML arrow Page 3 - Back to XUL: Uniting XUL and RDF
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Back to XUL: Uniting XUL and RDF
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2006-01-30

    Table of Contents:
  • Back to XUL: Uniting XUL and RDF
  • The Registration Process
  • Linking the DTD to the XUL File
  • Tell the Interface What to Do

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Back to XUL: Uniting XUL and RDF - Linking the DTD to the XUL File


    (Page 3 of 4 )

     

    As the DTD file is technically a resource, we are going to describe it with another contents.rdf file.  In a new text file, begin in the normal way with the XML declaration and the opening RDF:RDF statement, complete with namespaces:

    <?xml version="1.0"?>
     
    <RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                        xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
     
    Next, we give a name for the resource using the same bag and list format:
    <RDF:Bag about="urn:mozilla:locale:root">
            <RDF:li RDF:resource="urn:mozilla:locale:en-US"/>
    </RDF:Bag>
     
    We then use an RDF:Description to provide further details of the resource:
    <RDF:Description about="urn:mozilla:locale:en-US">
      <chrome:packages>
        <RDF:Bag about="urn:mozilla:locale:en-US:packages">
          <RDF:li resource="urn:mozilla:locale:en-US:interface"/>
        </RDF:Bag>
      </chrome:packages>
    </RDF:Description>

    Finally, the RDF:RDF element can be closed:

    </RDF:RDF>

    This file should be saved in the same location as the locale file it is describing.  We can now register this, much in the same way as the main interface file was registered.   Again, find the installed-chrome.txt file and add the following line to the bottom of the file:

    locale,install,url,file:///C|/XUL/XULEditLite/locale/en-US/

    Press return at the end, save and close the file, and as you are in the Mozilla/chrome directory, delete chrome.rdf.  Again, if this is done correctly, information relating to this locale will appear in the chrome.rdf file once it is recreated by Mozilla.

    More XML Articles
    More By Dan Wellman


       · Hello,Welcome to the third article in this series. This article foucses mainly...
     

    XML ARTICLES

    - Datatypes and More in RELAX NG
    - Providing Options in RELAX NG
    - An Introduction to RELAX NG
    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT