Как подключить файл dtd - PullRequest
0 голосов
/ 28 апреля 2020

Я сделал небольшой файл XML и файл DTD, и я хотел бы проверить, работает ли проверка из файла dtd, поскольку не вижу изменений. Здесь есть что-то, что нужно изменить, или все в порядке? если есть какие-либо изменения, которые необходимо внести, что это такое?

--- xml ---

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE furiture_shop SYSTEM "FS_18023702.dtd">
<!--<?xml-stylesheet type="text/css" href="FS_18023702.css"?>-->

<furiture_shop>
    <logo>

    </logo>
    <furiture>
        <name>SLATTUM</name>
        <furiture_type>Bed: Folding beds</furiture_type>
        <item_number>Item ID: 569764</item_number>
        <description>Description: Upholstered bed frame, Knisa light grey, Standard Double</description>
        <quantity>Amount Available: 8</quantity>
        <price>Price: £85.00</price>
        <deliery>Express Delivery</deliery>
    </furiture>

    <furiture>

        <name>VANGSTA</name>
        <furiture_type>Bed: Chair bed</furiture_type>
        <item_number>Item ID: 789123</item_number>
        <description>Description: Upholstered in dark grey Fernando fabric, this multi-functional piece contains a space saving guest bed which can easily and quickly fold back into a footstool when not in use. Comfort is provided thanks to its foam filled cushioning.  </description>
        <quantity>Amount Available: 65</quantity>
        <price>Price: £90.00</price>
        <deliery>Free Delivery</deliery>
        <manufacturer>
            <sub>Manufacturer: </sub>
        unite manufacturer
        </manufacturer>

        <colour>
            <sub>Colour: </sub>
            Black
        </colour>

        <materials>
            <sub>Material: </sub>
            Pine wood
        </materials>

        <optional>
            <arms>Scroll Arms</arms>
        </optional>         

    </furiture>

    <furiture>
        <name>LOBERGET</name>
        <furiture_type>Sofa: 3 Seater Sofa</furiture_type>
        <item_number>Item ID: 324587</item_number>
        <description>Description: An skilfully handcrafted, deep buttoned sofa with elegant curvaceous lines</description>
        <quantity>Amount Available: 16</quantity>
        <price>Price: £800.00</price>
    </furiture>

    <furiture>
        <name>SIBBEN</name>
        <furiture_type>Sofa: 6 Seater Modular Sofas</furiture_type>
        <item_number>Item ID: 598234</item_number>
        <description>Description: This soft and cosy sofa will have a long life as the seat cushions are filled with high resilience foam that gives good support for your body and quickly regains its original shape when you get up.</description>
        <quantity>Amount Available: 20</quantity>
        <price>Price: £160</price>
    </furiture>

    <furiture>
        <name>MALM</name>
        <furiture_type>Sofa</furiture_type>
        <item_number>Item ID: 157894</item_number>
        <description>Description: MALM is a generous seating series with a soft, deep seat and comfortable support for your back.</description>
        <quantity>Amount Available: 1</quantity>
        <price>Price: £350.00 </price>
    </furiture>

    <furiture>
        <name>HEMNES</name>
        <furiture_type>Dining Table</furiture_type>
        <item_number>Item ID: 597234</item_number>
        <description>Description: Extendable dining table with 1 extra leaf seats 4-6; makes it possible to adjust the table size according to need.</description>
        <quantity>Amount Available: 8</quantity>
        <price>Price: £635.00</price>
    </furiture>

    <furiture>
        <name>NIKKEBY</name>
        <furiture_type>Bed: Chair bed</furiture_type>
        <item_number>Item ID: 649782</item_number>
        <description>Description: A simple, firm foam mattress for use every night. Use your space at home more efficiently with an chair that doubles as a bed at night.</description>
        <quantity>Amount Available: 12</quantity>
        <price>Price: £140</price>
        <deliery>Free Delivery</deliery>
        <manufacturer>
            <sub>Manufacturer: </sub>
            Michael phillps inc
        </manufacturer>

        <colour>
            <sub>Colour: </sub>
            Red
        </colour>

        <materials>
            <sub>Material: </sub>
            Steel frame, foam mattress 
        </materials>

        <optional>
            <arms>Scroll Arms</arms>    
        </optional>         
    </furiture>

    <furiture>
        <name>PLATSA</name>
        <furiture_type>Dining table</furiture_type>
        <item_number>Item ID: 546793</item_number>
        <description>Description:Large extendable dining room table suitable for 8 - 12 people </description>
        <quantity>Amount Available: 13</quantity>
        <price>Price: £1260.00</price>
    </furiture>

    <furiture>
        <name>HYLLIS</name>
        <furiture_type>Armchair</furiture_type>
        <item_number>Item ID: 228944</item_number>
        <description>Description: The hardwood frame and fibre wrapped foam filled padded seat cushion allow for a supportive sit</description>
        <quantity>Amount Available: 8</quantity>
        <price>Price: £190.00</price>
    </furiture>

    <furiture>
        <name>KOLBJORN</name>
        <furiture_type>Dining table</furiture_type>
        <item_number>Item ID: 334489</item_number>
        <description>Description: A stylish and contemporary dining table. Able to seat up to 6 diners, this grey high-gloss dining set is perfect for kitchens or smaller dining rooms.</description>
        <quantity>Amount Available: 16</quantity>
        <price>Price: £69.99</price>
    </furiture>

    <furiture>
        <name>TORDH</name>
        <furiture_type>Armchair</furiture_type>
        <item_number>Item ID: 645873</item_number>
        <description>Description: With its compact design and unique silhouette, Herman is ideal for small spaces. The T-shaped seat cushion and bolster cushions make it both comfy and stylish. </description>
        <quantity>Amount Available: 13</quantity>
        <price>Price: £125.99</price>
    </furiture>

    <shop_Details>
        <store_name>The Furiture shop</store_name>
        <address>
            <street>51 Green Street</street>
            <town>Camden</town>
            <city>London</city>
            <postcode>N1 C56L</postcode>
        </address>
        <contact_num>
            <phone>Telephone: 0108 359 1762</phone>
            <fax>Fax: 0108 359 1763</fax>
        </contact_num>
        <siteadd>www.tfs.co.uk</siteadd>
    </shop_Details>
</furiture_shop>

--- файл ddt --- это dtd файл

<!ELEMENT furiture_shop (logo,furiture,shop_Details)>
<!ELEMENT logo EMPTY>
<!ELEMENT furiture (name,furiture_type,item_number,description,quantity,price,deliery*,manufacturer*,colour*,materials*,optional?)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT furiture_type (#PCDATA)>
<!ELEMENT item_number (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT quantity (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT deliery (#PCDATA)>
<!ELEMENT manufacturer (#PCDATA)>
<!ELEMENT colour(#PCDATA)>
<!ELEMENT materials(#PCDATA)>
<!ELEMENT optional (#PCDATA)>
<!ELEMENT shop_Details (store_name,address,contact_num,siteadd)>
<!ELEMENT address (street,town,city,postcode)>
<!ELEMENT street (#PCDATA)>
<!ELEMENT town (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT postcode (#PCDATA)>
<!ELEMENT contact_num (phone,fax)>
<!ELEMENT phone (#PCDATA)>
<!ELEMENT fax (#PCDATA)>
<!ELEMENT siteadd (PCDATA)>
...