17 import(
'lib.pkp.tests.PKPTestCase');
18 import(
'lib.pkp.classes.xslt.XMLTypeDescription');
33 $this->markTestSkipped();
40 $testXmlDom =
new DOMDocument();
41 $testXmlDom->load(dirname(__FILE__).
'/dtdsample-valid.xml');
42 self::assertTrue($typeDescription->isCompatible($testXmlDom));
43 $testXmlDom->load(dirname(__FILE__).
'/dtdsample-invalid.xml');
44 self::assertFalse($typeDescription->isCompatible($testXmlDom));
47 $typeDescription =
new XMLTypeDescription(
'schema('.dirname(__FILE__).
'/xsdsample.xsd)');
48 $testXmlDom =
new DOMDocument();
49 $testXmlDom->load(dirname(__FILE__).
'/xsdsample-valid.xml');
50 self::assertTrue($typeDescription->isCompatible($testXmlDom));
51 $testXmlDom->load(dirname(__FILE__).
'/xsdsample-invalid.xml');
52 self::assertFalse($typeDescription->isCompatible($testXmlDom));
55 $typeDescription =
new XMLTypeDescription(
'relax-ng('.dirname(__FILE__).
'/rngsample.rng)');
56 $testXmlDom =
new DOMDocument();
57 $testXmlDom->load(dirname(__FILE__).
'/rngsample-valid.xml');
58 self::assertTrue($typeDescription->isCompatible($testXmlDom));
59 $testXmlDom->load(dirname(__FILE__).
'/rngsample-invalid.xml');
60 self::assertFalse($typeDescription->isCompatible($testXmlDom));
66 <name>John Smith</name>
67 <email>js@example.com</email>
70 <name>Fred Bloggs</name>
71 <email>fb@example.net</email>
74 self::assertTrue($typeDescription->isCompatible($document));
79 $testXmlDom =
new DOMDocument();
80 $testXmlDom->load(dirname(__FILE__).
'/rngsample-valid.xml');
81 self::assertTrue($typeDescription->isCompatible($testXmlDom));
82 $testXmlDom->load(dirname(__FILE__).
'/rngsample-invalid.xml');
83 self::assertTrue($typeDescription->isCompatible($testXmlDom));