Copyright (C) 2000-2012 |
Whole document tree Image library files can be used to pass additional information about images to the stylesheet. The HTML stylesheet uses this information in the IMG tag; the print stylesheet may someday be able to use this information to get proper spacing around images, but I don't quite have that worked out yet. Image Library File FormatImage library files are XML documents conforming the image library DTD shown in . The stylesheets use the filename of the graphic file (either the name entered in the fileref attribute or the system identifier of the entity in the entityref attribute) to locate the appropriate image in the library. Creating Image Library FilesAt present, the files have to be created by hand. It's easy to imagine a tool that could scan the graphics and build the file (or at least part of the file) automatically, but none have been written yet. Image Library File LocationThe default location for image library files is imagelib/imagelib.xml. Using a subdirectory allows the image library file to be in XML while the documents may be in SGML. If you're formatting XML documents, you can move the image library into the same directory as your documents. The Catalog TrickIf you're formatting SGML documents, you have to employ a catalog trick in order to get Jade to properly parse the image library file. Add a catalog to the imagelib directory that contains the single line: SGMLDECL "path/to/xml.dcl" Jade will use that declaration to process all the documents in the imagelib directory. Using the Image LibraryYou can use the image library in one of two ways:
An ExampleSee the examples in the test directory. |