]> git.donarmstrong.com Git - flightcrew.git/blob - src/FlightCrew/Validators/Opf/TitlePresent.cpp
Imported Upstream version 0.7.2+dfsg
[flightcrew.git] / src / FlightCrew / Validators / Opf / TitlePresent.cpp
1 /************************************************************************
2 **
3 **  Copyright (C) 2010  Strahinja Markovic
4 **
5 **  This file is part of FlightCrew.
6 **
7 **  FlightCrew is free software: you can redistribute it and/or modify
8 **  it under the terms of the GNU Lesser General Public License as published
9 **  by the Free Software Foundation, either version 3 of the License, or
10 **  (at your option) any later version.
11 **
12 **  FlightCrew is distributed in the hope that it will be useful,
13 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 **  GNU Lesser General Public License for more details.
16 **
17 **  You should have received a copy of the GNU Lesser General Public License
18 **  along with FlightCrew.  If not, see <http://www.gnu.org/licenses/>.
19 **
20 *************************************************************************/
21
22 #include <stdafx.h>
23 #include "TitlePresent.h"
24
25 namespace FlightCrew
26 {
27
28 std::vector< Result > TitlePresent::ValidateXml(
29     const xc::DOMDocument &document,
30     const fs::path& )
31 {
32     std::vector< QName > possible_parents;
33     possible_parents.push_back( QName( "metadata",    OPF_XML_NAMESPACE ) );
34     possible_parents.push_back( QName( "dc-metadata", OPF_XML_NAMESPACE ) );
35
36     return VerifyElementPresent( 
37         QName( "title", DC_XML_NAMESPACE ), possible_parents, document );
38 }
39
40 } //namespace FlightCrew