XML
  Home arrow XML arrow Page 4 - 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 
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 - Tell the Interface What to Do


    (Page 4 of 4 )

    Lastly, we need to tell the main interface file to actually use the DTD.  At the top of interface.xul, just before the opening <window> tag, add the following line of code:

    <!DOCTYPE window SYSTEM "chrome://interface/locale/">

    Now that the main interface.xul file, the interface.dtd file and both of the associated rdf files have been created, and everything has been registered, we should finally be able to view the interface in Mozilla or its own window.

    To access the file correctly, in the Mozilla address bar type:

    chrome://interface/content

    To open it in its own window, open a command prompt and type:

    Mozilla –chrome chrome://interface/content

    There it is, in all its glory!  As you can see, the command we type to view the file is very similar to the command we type when we tell the interface file which DTD file to use.  Because these elements of the application are registered, we do not need a full path, we just say "use the interface content," or "use the interface locale." This is the power of the chrome URL.

    Now, for international support, you could simply create a new folder in the locale directory, named for the locale code (de represents German language for example) and into this put a DTD with the text strings in the alternative language. An rdf file is also used for registration purposes. Unlike some websites that can switch between languages at the click of a button, these alternative localization files/settings would normally be determined at install time, either through part of the installation asking the user which language to install the application in, or in some cases, the installer would be configured to choose whichever localization the operating system is set to.

    Admittedly, because there is no logic, none of the menu commands or buttons on the interface actually do anything.  At this stage, all it does is sit there and look pretty. This is a situation that needs to be rectified as quickly as possible, so the next article will show you how to construct the JavaScript file that will turn our interface from something that just looks good into something that not only looks good but also does what it was intended for – create XUL files.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

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

    XML ARTICLES

    - Using Regions with XSL Formatting Objects
    - Using XSL Formatting Objects
    - More Schematron Features
    - Schematron Patterns and Validation
    - Using Schematron
    - 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







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek