1<?php
2/**
3 * XML_GRDDL
4 *
5 * PHP version 5
6 *
7 * Copyright (c) 2008, Daniel O'Connor <daniel.oconnor@gmail.com>.
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 *
14 *   * Redistributions of source code must retain the above copyright
15 *     notice, this list of conditions and the following disclaimer.
16 *
17 *   * Redistributions in binary form must reproduce the above copyright
18 *     notice, this list of conditions and the following disclaimer in
19 *     the documentation and/or other materials provided with the
20 *     distribution.
21 *
22 *   * Neither the name of Daniel O'Connor nor the names of his
23 *     contributors may be used to endorse or promote products derived
24 *     from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
29 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
30 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
31 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
32 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
36 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 * POSSIBILITY OF SUCH DAMAGE.
38 *
39 * @category  Semantic_Web
40 * @package   XML_GRDDL
41 * @author    Daniel O'Connor <daniel.oconnor@gmail.com>
42 * @copyright 2008 Daniel O'Connor
43 * @license   http://www.opensource.org/licenses/bsd-license.php  BSD License
44 * @version   SVN: $Id: an-hcard-profile.php 261528 2008-06-23 11:20:59Z clockwerx $
45 * @link      http://code.google.com/p/xmlgrddl/
46 */
47
48require_once 'XML/GRDDL.php';
49
50/**
51 * Example: Read the RDF calendar / event information
52 * from Dan Connolly's w3 homepage.
53 *
54 * Compare the results to http://www.w3.org/2001/sw/grddl-wg/td/card-output.rdf
55 */
56
57$url = 'http://www.w3.org/2001/sw/grddl-wg/td/card.html';
58
59$grddl = XML_GRDDL::factory('xsl');
60
61var_dump($grddl->crawl($url));
62