<!--
Changelog:

19.02.2001 Translated to English from Norwegian, TB, KM
01.06.2001 Corrected "-" to "_"
15.11.2001 Changed tagorder in OBJECT_LOCATION EAS
07.01.2002 32 version generated, new handling of text blocks major change
10.09.2002 321 version generated, added leilighetsnr
20.05.2003      Declared OBJECT_HEAD as an entity
28.09.2004 Adjusted according to FNO2004 specification e.g. PRICE_RANGE on leisure_rent, BB
24.02.2006 Made Broker field multiple
17.08.2009 Primary room fields added
14.06.2010 Added ENERGY_LABEL
30.06.2010 Added ENERGY_LABEL_COLOR_CODE
11.08.2010 Added multiple instances ESTATE_BUSINESS_RENT->PROPERTY_TYPE
07.10.2010 Removed leisure_rent because this is now a travel ad_type
31.05.2011 Added TITLE and IMAGE_REF to BROKER
07.03.2013 Added VIDEO_URL.Currently supports links to Youtube and Vimeo.
31.03.2016 Changes to BROKER: Added IMAGE_REF for real and removed PHONE_SALES_RESERVATION
12.01.2018 Added VIRTUAL_VIEWING_URL for realestate
16.01.2018 Added VIRTUAL_VIEWING_URL for realestate_rent
16.10.2018 Removed PRICE_RANGE (used before for feriehus/hytte til leie)
15.07.2020 Updated head and objecthead DTD references to latest DTDs
           Removed NO_OF_BEDS. Use NO_OF_BEDROOMS instead.
           Removed BROKER/FAX
           Added ANIMALS_ALLOWED for ESTATE_RENT
10.11.2020 Bump HEAD tag to v4.0
01.11.2023 Add new estate sizes USEABLE_AREA_I, USEABLE_AREA_E, USEABLE_AREA_B, OPEN_AREA
23.02.2024 Add REFUGEES_WELCOME

    For elements requiring a reference value, check out
    https://hjelpesenter.finn.no/hc/no/articles/200214581-Extraction-of-predefined-values-for-use-in-xml-files
    for help.
-->
<!-- This is the DTD used for submitting estates for rent. Multiple objects may be included -->
<!ELEMENT IAD.IF.ESTATE.FORRENT (HEAD, OBJECT+)>

<!-- HEAD - partner / provider information -->
<!ENTITY % HEAD SYSTEM "https://www.finn.no/dtd/IADIF-head40.dtd">
%HEAD;

<!--
 The OBJECT Element consists of the HEAD, and possibly 4 other entities that describe
 type of estate information. Instead of the estate information, the estate may be sold. There is also
 information on whether the information shall be overwritten or if it shall be ignored.
-->
<!ELEMENT OBJECT (OBJECT_HEAD, (ESTATE_RENT | ESTATE_BUSINESS_RENT))>

<!-- OBJECT_HEAD - ad metadata -->
<!ENTITY % OBJECT_HEAD SYSTEM "https://www.finn.no/dtd/IADIF-objecthead22.dtd">
%OBJECT_HEAD;

<!-- List of fields for ESTATE_RENT -->
<!ELEMENT ESTATE_RENT (
    ESTATE_PREFERENCE*,
    MAPMATRIX*,
    BOLIGNUMMER*,
    VIEWING*,
    PROPERTY_TYPE,
    NO_OF_BEDROOMS,
    ESTATE_SIZE,
    FLOOR?,
    PLOT?,
    RENTAL_PRICE?,
    REFUGEES_WELCOME?,
    ANIMALS_ALLOWED?,
    CONSTRUCTION_YEAR?,
    RENOVATED_YEAR?,
    GENERAL_TEXT_REALESTATE*,
    MOREINFO*,
    ESTATE_EXTERNAL_URL?,
    VIRTUAL_VIEWING_URL?,
    TIMESPAN?,
    ENERGY_LABEL?,
    ENERGY_LABEL_COLOR_CODE?,
    BROKER*
)>

<!-- List of fields for ESTATE_BUSINESS_RENT -->
<!ELEMENT ESTATE_BUSINESS_RENT (
    ESTATE_PREFERENCE*,
    MAPMATRIX*,
    BOLIGNUMMER*,
    VIEWING*,
    PROPERTY_TYPE+,
    NO_OF_ROOMS?,
    NO_OF_PARKING_SPOTS?,
    ESTATE_SIZE,
    AREA_RANGE,
    FLOOR?,
    PLOT?,
    RENTAL_PRICE?,
    CONSTRUCTION_YEAR?,
    RENOVATED_YEAR?,
    GENERAL_TEXT_REALESTATE*,
    MOREINFO*,
    ESTATE_EXTERNAL_URL?,
    VIDEO_URL?,
    VIRTUAL_VIEWING_URL?,
    ACQUISITION?,
    ENERGY_LABEL?,
    ENERGY_LABEL_COLOR_CODE?,
    BUSINESS_ENCUMBRANCE?,
    BROKER*
)>

<!-- Enum. Estate preference must match a reference value. Several values can be included by repeating the tag -->
<!ELEMENT ESTATE_PREFERENCE (#PCDATA)>

<!-- Map matrix / Land register (Norsk: Matrikkel) information -->
<!ELEMENT MAPMATRIX (KOMMUNENR?, GAARDSNR?, BRUKSNR?, FESTENR?, SEKSJONSNR?, LEILIGHETSNR?)>
    <!-- Integer -->
    <!ELEMENT KOMMUNENR (#PCDATA)>
    <!-- Integer -->
    <!ELEMENT GAARDSNR (#PCDATA)>
    <!-- Integer -->
    <!ELEMENT BRUKSNR (#PCDATA)>
    <!-- Integer -->
    <!ELEMENT FESTENR (#PCDATA)>
    <!-- Integer -->
    <!ELEMENT SEKSJONSNR (#PCDATA)>
    <!-- Integer -->
    <!ELEMENT LEILIGHETSNR (#PCDATA)>

<!-- Text. Bolignummer / Bruksenhetsnummer. Must be a letter followed by four numbers without space. E.g: H0301 -->
<!ELEMENT BOLIGNUMMER (#PCDATA)>

<!-- Viewing information. Several time slots can be included by repeating the tag -->
<!ELEMENT VIEWING ((DATE, FROMTIME, TOTIME)?, NOTE?)>
    <!-- Date. Must follow the format DD.MM.YYYY where D, M and Y are numbers -->
    <!ELEMENT DATE (#PCDATA)>
    <!-- Timestamp. Must use the format HHMM where H and M are numbers -->
    <!ELEMENT FROMTIME (#PCDATA)>
    <!-- Timestamp. Must use the format HHMM where H and M are numbers -->
    <!ELEMENT TOTIME (#PCDATA)>
    <!-- Text. Maximum length 50 characters -->
    <!ELEMENT NOTE (#PCDATA)>

<!-- Enum. Property type must match a reference value. Description of estate type -->
<!ELEMENT PROPERTY_TYPE (#PCDATA)>

<!-- Integer. The number of bedrooms in the object. Only applicable to ESTATE_RENT -->
<!ELEMENT NO_OF_BEDROOMS (#PCDATA)>

<!-- Integer. The number of rooms in the object. Only applicable to ESTATE_BUSINESS_RENT -->
<!ELEMENT NO_OF_ROOMS (#PCDATA)>

<!-- Integer. The number of parkings spots available for the object. Only applicable to ESTATE_BUSINESS_RENT -->
<!ELEMENT NO_OF_PARKING_SPOTS (#PCDATA)>

<!-- Estate size-->
<!ELEMENT ESTATE_SIZE (PRIMARY_ROOM_AREA?, PRIMARY_ROOM_DESCRIPTION?, LIVING_AREA?, GROSS_AREA?, FLOOR_AREA?, USEABLE_AREA?, USEABLE_AREA_I?, USEABLE_AREA_E?, USEABLE_AREA_B?, OPEN_AREA?)>
    <!-- Integer. The amount of primary room area available in m^2 -->
    <!ELEMENT PRIMARY_ROOM_AREA (#PCDATA)>
    <!-- Text. Describes which rooms that are included in the primary room area -->
    <!ELEMENT PRIMARY_ROOM_DESCRIPTION (#PCDATA)>
    <!-- Integer. The amount of living area available in m^2 -->
    <!ELEMENT LIVING_AREA (#PCDATA)>
    <!-- Integer. The amount of gross area available in m^2 -->
    <!ELEMENT GROSS_AREA (#PCDATA)>
    <!-- Integer. The amount of floor area available in m^2 -->
    <!ELEMENT FLOOR_AREA (#PCDATA)>
    <!-- Integer. The amount of usable area available in m^2 -->
    <!ELEMENT USEABLE_AREA (#PCDATA)>

    <!-- Type: POSITIVE INTEGER. Description in Norwegian: Internt bruksareal (BRA-i) -->
    <!ELEMENT USEABLE_AREA_I (#PCDATA)>

    <!-- Type: POSITIVE INTEGER. Description in Norwegian: Eksternt bruksareal (BRA-e) -->
    <!ELEMENT USEABLE_AREA_E (#PCDATA)>

    <!-- Type: POSITIVE INTEGER. Description in Norwegian: Innglasset balkong mv (BRA-b) -->
    <!ELEMENT USEABLE_AREA_B (#PCDATA)>

    <!-- Type: POSITIVE INTEGER. Description in Norwegian: Åpent areal-->
    <!ELEMENT OPEN_AREA (#PCDATA)>

<!-- Area range. Only applicable to ESTATE_BUSINESS_RENT. Used to indicate the range of area possible to rent -->
<!ELEMENT AREA_RANGE (AREA_FROM, AREA_TO)>
    <!-- Integer -->
    <!ELEMENT AREA_FROM (#PCDATA)>
    <!-- Integer. Must be higher than AREA_FROM -->
    <!ELEMENT AREA_TO (#PCDATA)>

<!-- Text. Information about the floor (Type, age, etc) -->
<!ELEMENT FLOOR (#PCDATA)>

<!-- Information about the plot -->
<!ELEMENT PLOT (AREA?, CONDITION?, GROUND_TAX?, GROUND_YEAR?)>
    <!-- Is the plot owned? -->
    <!ATTLIST PLOT
        OWNED (yes | no) #IMPLIED>
    <!-- Integer. The size of the plot in m^2-->
    <!ELEMENT AREA (#PCDATA)>
    <!-- Text. Description of plot condition -->
    <!ELEMENT CONDITION (#PCDATA)>
    <!-- Integer. Ground tax (Norsk: Festeavgift) for the plot in NOK-->
    <!ELEMENT GROUND_TAX (#PCDATA)>
    <!-- Integer. The year the ground was initially rented in the format YYYY -->
    <!ELEMENT GROUND_YEAR (#PCDATA)>

<!-- Rental price -->
<!ELEMENT RENTAL_PRICE (PER_YEAR?, PER_MONTH?, PER_WEEK?, PER_DAY?, DEPOSIT?, CURRENCY?, INCLUDES?)>
    <!-- Integer. The price to rent per year -->
    <!ELEMENT PER_YEAR (#PCDATA)>
    <!-- Integer. The price to rent per month -->
    <!ELEMENT PER_MONTH (#PCDATA)>
    <!-- Integer. The price to rent per week -->
    <!ELEMENT PER_WEEK (#PCDATA)>
    <!-- Integer. The price to rent per day -->
    <!ELEMENT PER_DAY (#PCDATA)>
    <!-- Integer. The amount of deposit required to rent the estate -->
    <!ELEMENT DEPOSIT (#PCDATA)>
    <!-- Text. ISO 3 letter code e.g. NOK -->
    <!ELEMENT CURRENCY (#PCDATA)>
    <!-- Text. Description of what the rent includes-->
    <!ELEMENT INCLUDES (#PCDATA)>

<!-- Enum. Refugees welcome must match a reference value. Only applicable to ESTATE_RENT -->
<!ELEMENT REFUGEES_WELCOME (#PCDATA)>

<!-- Enum. Animals allowed must match a reference value. Only applicable to ESTATE_RENT -->
<!ELEMENT ANIMALS_ALLOWED (#PCDATA)>

<!-- Integer. The year the estate was constructed in the format YYYY -->
<!ELEMENT CONSTRUCTION_YEAR (#PCDATA)>

<!-- Integer. The year the estate was last renovated in the format YYYY -->
<!ELEMENT RENOVATED_YEAR (#PCDATA)>

<!--- General text block with heading. Multiple blocks may be included by repeating the tag-->
<!ELEMENT GENERAL_TEXT_REALESTATE (GENERAL_HEADING, GENERAL_TEXT)>
    <!-- Text -->
    <!ELEMENT GENERAL_HEADING (#PCDATA)>
    <!-- Text -->
    <!ELEMENT GENERAL_TEXT (#PCDATA)>

<!-- External URLs. Several URLs may be included by repeating the tag -->
<!ELEMENT MOREINFO (URL, URLTEXT?)>
    <!-- Text. URL of the form http(s)://example.com/example -->
    <!ELEMENT URL (#PCDATA)>
    <!-- Text. The clickable text shown on the web page -->
    <!ELEMENT URLTEXT (#PCDATA)>

<!-- External URL to web page about the estate. URL of the form http(s)://example.com/example -->
<!ELEMENT ESTATE_EXTERNAL_URL (#PCDATA)>

<!-- Use only approved video host sites -->
<!ELEMENT VIDEO_URL (#PCDATA)>

<!-- External URL to web page with virtual viewing of the estate. URL of the form http(s)://example.com/example -->
<!ELEMENT VIRTUAL_VIEWING_URL (#PCDATA)>

<!-- Date or text. Date of the format DD.MM.YYYY where D, M and Y are numbers, or open text field. The time of acquisition for the estate. Only applicable to ESTATE_BUSINESS_RENT -->
<!ELEMENT ACQUISITION (#PCDATA)>

<!-- The interval the estate is rented for. Only applicable to ESTATE_RENT -->
<!ELEMENT TIMESPAN (RENTFROM?, RENTTO?)>
    <!-- Date. Must follow ISO-8601 format: YYYY-MM-DD -->
    <!ELEMENT RENTFROM (#PCDATA)>
    <!-- Date. Must follow ISO-8601 format: YYYY-MM-DD -->
    <!ELEMENT RENTTO (#PCDATA)>

<!-- Enum. Energy label must match a reference value -->
<!ELEMENT ENERGY_LABEL (#PCDATA)>

<!-- Enum. Energy label color code must match a reference value -->
<!ELEMENT ENERGY_LABEL_COLOR_CODE (#PCDATA)>

<!-- Text. Description of business encumbrance -->
<!ELEMENT BUSINESS_ENCUMBRANCE (#PCDATA)>

<!-- Information about the responsible broker(s). May contain up to two brokers by repeating the tag. Do not exceed more than two instances of the tag -->
<!ELEMENT BROKER (NAME?, TITLE?, PHONE?, MOBILE?, EMAIL?, URL?, IMAGE_REF?)>
    <!-- Text. The name of the broker -->
    <!ELEMENT NAME (#PCDATA)>
    <!-- Text. The title of the broker -->
    <!ELEMENT TITLE (#PCDATA)>
    <!-- Text. Must be a valid phone number -->
    <!ELEMENT PHONE (#PCDATA)>
    <!-- Text. Must be a valid phone number -->
    <!ELEMENT MOBILE (#PCDATA)>
    <!-- Text. Must be a valid email address -->
    <!ELEMENT EMAIL (#PCDATA)>
    <!-- Text. Reference to an uploaded image -->
    <!ELEMENT IMAGE_REF (#PCDATA)>
