Skip to content

Commit

Permalink
Merge pull request #222 from qualipool/idx-to-sr-categories
Browse files Browse the repository at this point in the history
Idx to sr categories
  • Loading branch information
DominicFath committed Oct 12, 2023
2 parents d308cb7 + 0bc4bd7 commit 3f12e76
Show file tree
Hide file tree
Showing 26 changed files with 2,322 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./scripts/php
Expand Down
210 changes: 136 additions & 74 deletions docs/Categories.md

Large diffs are not rendered by default.

2,081 changes: 2,081 additions & 0 deletions docs/dist/v2.6.0/schema.xsd

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/docs/noNamespace/simpleType/categories.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/empty.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<properties />
</export>
2 changes: 1 addition & 1 deletion examples/full.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<created>2012-12-13T12:12:12</created>
<generator version="v3.4.5">Some Immo Soft</generator>
<projects>
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal-projects.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<projects>
<project id="str1234">
<referenceId>str1234</referenceId>
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal-properties.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<properties>
<property id="1245687">
<referenceId>LA-644238</referenceId>
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<properties>
<property id="1245687">
<referenceId>LA-644238</referenceId>
Expand Down
2 changes: 1 addition & 1 deletion examples/project-tree.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<projects>
<project id="proj">
<referenceId>proj</referenceId>
Expand Down
2 changes: 1 addition & 1 deletion examples/property-prices-rent-variants.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<properties>
<property id="1245687only-full-default-order">
<referenceId>LA-644238</referenceId>
Expand Down
103 changes: 82 additions & 21 deletions schema/schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -935,91 +935,128 @@
<xs:documentation>The distinct object type name or object built type.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="agricultural-lot" />
<xs:enumeration value="allotment-garden" />
<xs:enumeration value="apartment">
<xs:annotation>
<xs:documentation>apartment - A part of a building, suitable for people to live in.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="arcade" />
<xs:enumeration value="atelier">
<xs:annotation>
<xs:documentation>atelier - A private workshop or studio of hobbyists or professionals.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="attic-compartment" />
<xs:enumeration value="attic-flat">
<xs:annotation>
<xs:documentation>attic-flat - A free-standing apartment, built onto the roof of a multi-story building, also called a penthouse.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="bakery" />
<xs:enumeration value="bar">
<xs:annotation>
<xs:documentation>bar - Where drinks, especially alcoholic drinks, are sold and drunk.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="boat-dry-dock" />
<xs:enumeration value="boat-landing-stage" />
<xs:enumeration value="boat-mooring" />
<xs:enumeration value="building-lot" />
<xs:enumeration value="butcher" />
<xs:enumeration value="cafe">
<xs:annotation>
<xs:documentation>cafe - Small restaurant where simple meals and drinks are served.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="campground" />
<xs:enumeration value="car-park" />
<xs:enumeration value="car-repair-shop">
<xs:annotation>
<xs:documentation>car-repair-shop - An automobile repair shop, also known regionally as a garage.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="carpentry-shop" />
<xs:enumeration value="casino" />
<xs:enumeration value="castle">
<xs:annotation>
<xs:documentation>castle - A large building, typically of the medieval period, fortified against attack with thick walls, battlements, towers, and in many cases a moat.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="cellar-compartment" />
<xs:enumeration value="chalet">
<xs:annotation>
<xs:documentation>chalet - A wooden house with overhanging eaves, typically found in the Swiss Alps.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="earth-sheltered-dwelling">
<xs:annotation>
<xs:documentation>earth-sheltered-dwelling - A house, flat, or other place of residence, with a significant amount of soil or substrate in contact with its external envelope.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="cheese-factory" />
<xs:enumeration value="club-disco" />
<xs:enumeration value="commercial-lot" />
<xs:enumeration value="commercial-space" />
<xs:enumeration value="covered-motorbike-parking-space" />
<xs:enumeration value="covered-parking-space" />
<xs:enumeration value="department-store" />
<xs:enumeration value="detached-house">
<xs:annotation>
<xs:documentation>detached-house - A stand-alone free-standing residential building, also called a single-detached dwelling or single-family house.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="display-window" />
<xs:enumeration value="doctors-office">
<xs:annotation>
<xs:documentation>doctors-office - Doctors' offices are the primary place where ambulatory care is given, and are often the first place that a sick person would go for care, also called a doctor's practice.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="double-garage" />
<xs:enumeration value="duplex-house">
<xs:annotation>
<xs:documentation>duplex-house - A divided house, two living units attached, either side by side or one above the other, also called two-family house.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="earth-sheltered-dwelling">
<xs:annotation>
<xs:documentation>earth-sheltered-dwelling - A house, flat, or other place of residence, with a significant amount of soil or substrate in contact with its external envelope.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="factory" />
<xs:enumeration value="farm-house">
<xs:annotation>
<xs:documentation>farm-house - Usually a larger house combining different needs, typically the accommodation wing is attached to a stable, a shelter, a shed or a stock.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="fuel-station" />
<xs:enumeration value="furnished-flat">
<xs:annotation>
<xs:documentation>furnished-flat - Typically a flat or house which comes with all the built-in and loose furniture, refrigerator, washer and dryer and other essential electric appliances.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="golf-course" />
<xs:enumeration value="granny-flat">
<xs:annotation>
<xs:documentation>granny-flat - A set of rooms, often connected to or part of a relation's house, typically with a separate house entry, not to be confused with the 'stoeckli' category.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="hairdresser" />
<xs:enumeration value="hobby-room">
<xs:annotation>
<xs:documentation>hobby-room - A sparate room for activities done regularly in one's leisure time for pleasure, similar to an atelier, but not limited to creating things.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="hospital" />
<xs:enumeration value="hotel">
<xs:annotation>
<xs:documentation>hotel - An establishment providing accommodation, meals, and other services for travellers and tourists.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="horse-box" />
<xs:enumeration value="indoor-swimming-pool" />
<xs:enumeration value="indoor-tennis-court" />
<xs:enumeration value="industrial-lot" />
<xs:enumeration value="industrial-object" />
<xs:enumeration value="kiosk" />
<xs:enumeration value="laboratory" />
<xs:enumeration value="library" />
<xs:enumeration value="loft">
<xs:annotation>
<xs:documentation>loft - A single room flat, typically built in an old industry storage halls or newly built as a loft flat.</xs:documentation>
Expand All @@ -1030,11 +1067,17 @@
<xs:documentation>maisonette - A flat with at least two connected stories in a building, typically the story directly under the roof and the one below.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="market-garden" />
<xs:enumeration value="mini-golf-course" />
<xs:enumeration value="motel" />
<xs:enumeration value="movie-theater" />
<xs:enumeration value="multiplex-house">
<xs:annotation>
<xs:documentation>multiplex-house - A divided house, more than two living units attached, either side by side and/or one above the other, also called multifamily house or multiple-dwelling.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="multistorey-car-park" />
<xs:enumeration value="nursing-home" />
<xs:enumeration value="office">
<xs:annotation>
<xs:documentation>office - A place in which business, clerical, or professional activities are conducted.</xs:documentation>
Expand All @@ -1045,6 +1088,23 @@
<xs:documentation>one-room-flat - A studio flat in which the bedroom, sitting-room and kitchen are all one-room, not to be confused with the 'single-room' category.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="open-motorbike-parking-space" />
<xs:enumeration value="open-parking-space" />
<xs:enumeration value="orphanage" />
<xs:enumeration value="outdoor-swimming-pool" />
<xs:enumeration value="parking-space">
<xs:annotation>
<xs:documentation>Simple non-descriptive place to park a car.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="party-room" />
<xs:enumeration value="plot">
<xs:annotation>
<xs:documentation>Land area or a piece of empty property.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="pub" />
<xs:enumeration value="residential-commercial-building" />
<xs:enumeration value="restaurant">
<xs:annotation>
<xs:documentation>restaurant - Commercial establishment where meals are prepared and served to customers.</xs:documentation>
Expand All @@ -1055,6 +1115,8 @@
<xs:documentation>retail-location - A space for the selling of goods to consumers.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="retirement-home" />
<xs:enumeration value="riding-hall" />
<xs:enumeration value="roof-flat">
<xs:annotation>
<xs:documentation>roof-flat - An apartment directly under the roof, typically features roof slopes.</xs:documentation>
Expand All @@ -1070,16 +1132,17 @@
<xs:documentation>rustico - A converted or rebuilt old small landside house, typically found in Ticino region on mountain slopes.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="sanatorium" />
<xs:enumeration value="sauna" />
<xs:enumeration value="shopping-center" />
<xs:enumeration value="single-room">
<xs:annotation>
<xs:documentation>single-room - A single room, typically for rent, does not necessarily include an own bathroom or kitchen, not to be confused with the 'one-room-flat' category.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="stoeckli">
<xs:annotation>
<xs:documentation>stoeckli - A small house, typically near a larger farm-house, in the past they were residences for aged farmers after turning over the farm to their heirs, not to be confused with the 'granny-flat' category.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="solarium" />
<xs:enumeration value="sports-hall" />
<xs:enumeration value="squash-badminton" />
<xs:enumeration value="stepped-flat">
<xs:annotation>
<xs:documentation>stepped-flat - A set of rooms for living in, arranged in a staircase like manner, typicaly over two or more floors.</xs:documentation>
Expand All @@ -1090,6 +1153,14 @@
<xs:documentation>stepped-house - A building containing one or more apartments arranged in a staircase manner, in order to maximize the outside space.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="stoeckli">
<xs:annotation>
<xs:documentation>stoeckli - A small house, typically near a larger farm-house, in the past they were residences for aged farmers after turning over the farm to their heirs, not to be confused with the 'granny-flat' category.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="storage-room" />
<xs:enumeration value="tennis-court" />
<xs:enumeration value="underground-parking-space" />
<xs:enumeration value="villa">
<xs:annotation>
<xs:documentation>villa - A large and luxurious house in its own grounds.</xs:documentation>
Expand All @@ -1100,16 +1171,6 @@
<xs:documentation>workshop - A room or building in which goods are manufactured or repaired, for commercial or business reasons.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="plot">
<xs:annotation>
<xs:documentation>Land area or a piece of empty property.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="parking-space">
<xs:annotation>
<xs:documentation>Simple non-descriptive place to park a car.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="emailaddress">
Expand Down Expand Up @@ -1220,7 +1281,7 @@
</xs:restriction>
</xs:simpleType>
<!-- actual xml structure -->

<xs:element name="export" type="exportType">
<xs:keyref name="propertyUnitKeyRef" refer="propertyUnitKey">
<xs:selector xpath="properties/*"/>
Expand Down
2 changes: 1 addition & 1 deletion scripts/xmllint/should-fail/availability-missing.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<properties>
<property id="1245687">
<referenceId>LA-644238</referenceId>
Expand Down
2 changes: 1 addition & 1 deletion scripts/xmllint/should-fail/categories-empty.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<properties>
<property id="1245687">
<referenceId>LA-644238</referenceId>
Expand Down
2 changes: 1 addition & 1 deletion scripts/xmllint/should-fail/localization-lang-missing.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<properties>
<property id="1245687">
<referenceId>LA-644238</referenceId>
Expand Down
2 changes: 1 addition & 1 deletion scripts/xmllint/should-fail/localization-name-missing.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<properties>
<property id="1245687">
<referenceId>LA-644238</referenceId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<properties>
<property id="1245687">
<referenceId>LA-644238</referenceId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<properties>
<property id="1245687">
<referenceId>LA-644238</referenceId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<properties>
<property id="1245687">
<referenceId>LA-644238</referenceId>
Expand Down
2 changes: 1 addition & 1 deletion scripts/xmllint/should-fail/localizations-empty.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.5.0/schema.xsd">
<export xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://swissrets.ch/dist/v2.6.0/schema.xsd">
<properties>
<property id="1245687">
<referenceId>LA-644238</referenceId>
Expand Down
Loading

0 comments on commit 3f12e76

Please sign in to comment.