<?xml version="1.0" encoding="UTF-8"?>
<!-- Version 1.0 of the TripAdvisor Photo List XML Schema.
  -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

    <xsd:element name="PropertyList">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="Property" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="Property">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="Photos" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attribute name="id" type="xsd:integer" use="required"/>
            <xsd:attribute name="cityid" type="xsd:integer"/>
            <xsd:attribute name="countryid" type="xsd:integer"/>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="Photos">
        <xsd:annotation>
            <xsd:documentation>
                List of recently added photos for this property.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element minOccurs="0" maxOccurs="unbounded" ref="Photo"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="Photo">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="Author" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="DatePublished" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="Caption" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="ThumbnailURL" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="LargeThumbnailURL" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="FullSizeURL" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="StandardSizeURL" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="OriginalSizeURL" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="ViewerURL" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="TripadvisorURL" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="ThumbsUpCount" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="ThumbsDownCount" minOccurs="0" maxOccurs="1"/>
            </xsd:sequence>
            <xsd:attribute name="photoid" type="xsd:integer" use="required"/>
            <xsd:attribute name="reviewid" type="xsd:integer"/>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="Author">
        <xsd:annotation>
            <xsd:documentation>
                Information about the author of the review.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element minOccurs="0" maxOccurs="1" ref="AuthorName"/>
                <xsd:element minOccurs="0" maxOccurs="1" ref="Location"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element> <!-- END Author Element -->

    <xsd:element name="AuthorName">
        <xsd:annotation>
            <xsd:documentation>
                The displayable name of the review author. Maybe either
                first name and last initial, or screen name.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:simpleType>
            <xsd:restriction base="xsd:string"/>
        </xsd:simpleType>
    </xsd:element> <!-- END AuthorName Element -->

    <xsd:element name="Location">
        <xsd:annotation>
            <xsd:documentation>
                The location of the review author.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:simpleType>
            <xsd:restriction base="xsd:string"/>
        </xsd:simpleType>
    </xsd:element> <!-- END Location Element -->

    <xsd:element name="Caption">
        <xsd:annotation>
            <xsd:documentation>
                Caption text.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:simpleType>
            <xsd:restriction base="xsd:string"/>
        </xsd:simpleType>
    </xsd:element> <!-- END Caption Element -->

    <xsd:element name="DatePublished">
        <xsd:annotation>
            <xsd:documentation>
                The date and time the photo was published on the site. Format "yyyy-MM-dd'T'HH:mm:ss.SSSZ" (i.e.,
                2001-07-04T12:08:56.235-070
                0).
            </xsd:documentation>
        </xsd:annotation>
        <xsd:simpleType>
            <xsd:restriction base="xsd:string"/>
        </xsd:simpleType>
    </xsd:element> <!-- END DatePublished Element -->

    <xsd:element name="ThumbnailURL">
        <xsd:annotation>
            <xsd:documentation>
                URL to the thumbnail size for this image, will always be 50x50.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:simpleContent>
                <xsd:extension base="xsd:string">
                    <xsd:attribute name="height" type="xsd:integer" use="required"/>
                    <xsd:attribute name="width" type="xsd:integer" use="required"/>
                </xsd:extension>
            </xsd:simpleContent>
        </xsd:complexType>
    </xsd:element> <!-- END ThumbnailURL Element -->

    <xsd:element name="LargeThumbnailURL">
        <xsd:annotation>
            <xsd:documentation>
                URL to the large thumbnail size for this image, will always be 150x150.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:simpleContent>
                <xsd:extension base="xsd:string">
                    <xsd:attribute name="height" type="xsd:integer" use="required"/>
                    <xsd:attribute name="width" type="xsd:integer" use="required"/>
                </xsd:extension>
            </xsd:simpleContent>
        </xsd:complexType>
    </xsd:element> <!-- END LargeThumbnailURL Element -->

    <xsd:element name="FullSizeURL">
        <xsd:annotation>
            <xsd:documentation>
                URL to the full size for this image.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:simpleContent>
                <xsd:extension base="xsd:string">
                    <xsd:attribute name="height" type="xsd:integer" use="required"/>
                    <xsd:attribute name="width" type="xsd:integer" use="required"/>
                </xsd:extension>
            </xsd:simpleContent>
        </xsd:complexType>
    </xsd:element> <!-- END FullSizeURL Element -->

    <xsd:element name="StandardSizeURL">
        <xsd:annotation>
            <xsd:documentation>
                URL to the standard size for this image.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:simpleContent>
                <xsd:extension base="xsd:string">
                    <xsd:attribute name="height" type="xsd:integer" use="required"/>
                    <xsd:attribute name="width" type="xsd:integer" use="required"/>
                </xsd:extension>
            </xsd:simpleContent>
        </xsd:complexType>
    </xsd:element> <!-- END StandardSizeURL Element -->

    <xsd:element name="OriginalSizeURL">
        <xsd:annotation>
            <xsd:documentation>
                URL to the original size for this image.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:simpleContent>
                <xsd:extension base="xsd:string">
                    <xsd:attribute name="height" type="xsd:integer" use="required"/>
                    <xsd:attribute name="width" type="xsd:integer" use="required"/>
                </xsd:extension>
            </xsd:simpleContent>
        </xsd:complexType>
    </xsd:element> <!-- END OriginalSizeURL Element -->

    <xsd:element name="ViewerURL">
        <xsd:annotation>
            <xsd:documentation>
                URL to the photo viewer that will have this photo.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:simpleType>
            <xsd:restriction base="xsd:string"/>
        </xsd:simpleType>
    </xsd:element> <!-- END ViewerURL Element -->

    <xsd:element name="TripadvisorURL">
        <xsd:annotation>
            <xsd:documentation>
                URL on the TA site.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:simpleType>
            <xsd:restriction base="xsd:anyURI"/>
        </xsd:simpleType>
    </xsd:element> <!-- END TripadvisorURL Element -->

    <xsd:element name="ThumbsUpCount">
        <xsd:annotation>
            <xsd:documentation>
                Number of thumbs up for this photo.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:simpleType>
            <xsd:restriction base="xsd:integer"/>
        </xsd:simpleType>
    </xsd:element> <!-- END ThumbsUpCount Element -->

    <xsd:element name="ThumbsDownCount">
        <xsd:annotation>
            <xsd:documentation>
                Number of thumbs down for this photo.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:simpleType>
            <xsd:restriction base="xsd:integer"/>
        </xsd:simpleType>
    </xsd:element> <!-- END ThumbsDownCount Element -->

</xsd:schema>
