X hits on this document

451 views

0 shares

1 downloads

0 comments

63 / 142

XHTML

  • K.

    Create a new empty file in NotePad, and save it as ala.css.

  • L.

    Add only two selectors to the CSS file, each for a different implementation of the p element

  • (i.

    e. p { font-family: times, serif; font-size: large } and p.salutation { text-align: right } ).

M. Add the common attribute "class" to the last paragraph of your letter giving it a value of sa- lutation (i.e. <p class="salutation"> ).

N.

Save your file, again, and view it in your Web browser.

Exercise - Convert MARC to XHTML

As you know, MARC is a data structure/file format used to bibliographically describe the many things in libraries. It is also the format used to record authority information as well as holdings. In this exercise you will convert MARC data into a rudimentary XHTML file format.

  • 1.

    Using your text editor, open the file named marc/single/catalog.marc. Notice the standard format for MARC. Very compact. Very efficient in terms of disc space. Designed for sequencial read ac- cess from tape drives. Not very human readable. For example, what is the title of the first record?

  • 2.

    Install Perl. (This process is more completely described in a later section of the workbook. Altern- atively, you may be able to simply copy the Perl directory from the CD to the C drive of your Win- dows computer.)

  • 3.

    Install MARC::Record. MARC::Record is the Perl module to use when reading and writing MARC data. If you are using Unix, then you should be able to sudo cpan and then install MARC::Record at the cpan prompt. Under Windows you can use ppm and then enter install MARC::Record.

  • 4.

    Open the file named bin/marc2xhtml.pl in your text editor. Notice how it includes the necessary Perl modules, reads the command line input, initializes a constant, and finally loops through each MARC record from the input in order to output XHTML files. It does this by selectively reading data from each record and stuffing the resulting values into meta elments of the XHTML file's head.

  • 5.

    Open a command prompt and change directories to the workbook's root.

  • 6.

    Convert some MARC records by issuing this command: perl bin/marc2xhtml.pl /get- ting-started/marc/single/catalog.marc /getting-started/xhtml/marc2xhtml/. Be forewarned. You must enter full and complete paths as input. Otherwise the script will get confused.

When done, you should see sets of XHTML files in the output directory. Open one or more using your Web browser. As an extra exercise, use xmllint to validate selected files from the output.

Exercise - Tranform MARCXML-like (SFX) to XHTML

[INSERT sfx2html.xsl HERE]

55

Document info
Document views451
Page views457
Page last viewedFri Dec 09 03:27:54 UTC 2016
Pages142
Paragraphs3126
Words34660

Comments