Perl Cd Bookshelf [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Perl Cd Bookshelf [Electronic resources] - نسخه متنی

Mark V. Scardina, Ben ChangandJinyu Wang

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






The XML Media Files

To illustrate this use case, it is sufficient to use simple XML data files for the catalogs of the different media types. These files could be based upon either DTDs or XML schemas. In this

case we chose to use DTDs as most of this type of content is based on DTDs and there are no datatypes used beyond strings that would benefit from an XML Schema data model.

Even though each book, CD, and DVD listing has common components, since you will be using the DOCTYPE value to differentiate the type of processing, we have chosen to create three DTDs:

bookcatalog.dtd

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT color64K (#PCDATA)>
<!ATTLIST color64K URL ENTITY #REQUIRED>
<!ELEMENT color256 (#PCDATA)>
<!ATTLIST color256 URL ENTITY #REQUIRED>
<!ELEMENT color16 (#PCDATA)>
<!ATTLIST color16 URL ENTITY #REQUIRED>
<!ELEMENT graphics (color256 | color16 | color64K)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT ISBN (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author_lastname (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT book (ISBN, title, author_lastname, publisher,
year, graphics, price )>
<!ELEMENT Bookcatalog (book+)>

cdcatalog.dtd

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT color64K (#PCDATA)>
<!ATTLIST color64K URL ENTITY #REQUIRED>
<!ELEMENT color256 (#PCDATA)>
<!ATTLIST color256 URL ENTITY #REQUIRED>
<!ELEMENT color16 (#PCDATA)>
<!ATTLIST color16 URL ENTITY #REQUIRED>
<!ELEMENT graphics (color256 | color16 | color64K)>
<!ELEMENT ISBN (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT artist_lastname (#PCDATA)>
<!ELEMENT producer (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT cd (ISBN, title, artist_lastname, producer,
year, graphics, price )>
<!ELEMENT CDcatalog (cd+)>

dvdcatalog.dtd

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT color64K (#PCDATA)>
<!ATTLIST color64K URL ENTITY #REQUIRED>
<!ELEMENT color256 (#PCDATA)>
<!ATTLIST color256 URL ENTITY #REQUIRED>
<!ELEMENT color16 (#PCDATA)>
<!ATTLIST color16 URL ENTITY #REQUIRED>
<!ELEMENT graphics (color256 | color16 | color64K)>
<!ELEMENT ISBN (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT director_lastname (#PCDATA)>
<!ELEMENT studio (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT dvd (ISBN, title, director_lastname, studio, year,
graphics, price )>
<!ELEMENT DVDcatalog (dvd+)>

Note that each book, CD, and DVD catalog element has a plus appended to indicate that there needs to be one or more records for the input files to be valid. Also, we are using the element content for each graphic for its name and an attribute of type ENTITY to point to its location.

/ 218