Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"description" : "XML APIs for the XP Framework",
"keywords": ["module", "xp"],
"require" : {
"xp-framework/core": "^12.0 | ^11.0 | ^10.0",
"xp-framework/core": "^12.11 | ^11.11",
"xp-framework/collections": "^10.0 | ^9.0 | ^8.0",
"xp-framework/reflection": "^3.1",
"php" : ">=7.4.0"
Expand Down
8 changes: 4 additions & 4 deletions src/main/php/xml/DomXSLProcessor.class.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace xml;

use io\FileNotFoundException;
use io\NotFound;
use util\Objects;
use xml\xslt\{XSLDateCallback, XSLStringCallback};

Expand Down Expand Up @@ -94,11 +94,11 @@ public function setSchemeHandler($defines) {
* Set XSL file
*
* @param string file file name
* @throws io.FileNotFoundException
* @throws io.NotFound
*/
public function setXSLFile($file) {
if (!file_exists($this->_base.urldecode($file)))
throw new FileNotFoundException($this->_base.$file.' not found');
throw new NotFound($this->_base.$file.' not found');

libxml_get_last_error() && libxml_clear_errors();

Expand Down Expand Up @@ -157,7 +157,7 @@ public function setXSLTree(Tree $xsl) {
*/
public function setXMLFile($file) {
if (!file_exists($this->_base.urldecode($file))) {
throw new FileNotFoundException($this->_base.$file.' not found');
throw new NotFound($this->_base.$file.' not found');
}

libxml_get_last_error() && libxml_clear_errors();
Expand Down
6 changes: 3 additions & 3 deletions src/test/php/xml/unittest/AbstractProcessorTest.class.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace xml\unittest;

use io\FileNotFoundException;
use io\NotFound;
use lang\Runtime;
use test\{Assert, Before, Expect, Test};
use xml\{TransformerException, Tree};
Expand Down Expand Up @@ -71,7 +71,7 @@ public function setUp() {
$this->xmlDeclaration= '<?xml version="1.0" encoding="'.$this->processorCharset().'"?>';
}

#[Test, Expect(FileNotFoundException::class)]
#[Test, Expect(NotFound::class)]
public function setNonExistantXMLFile() {
$this->processor->setXMLFile(':does-no-exist:');
}
Expand Down Expand Up @@ -106,7 +106,7 @@ public function setMalformedXMLBuf() {
$this->processor->setXMLBuf('this-is-not-valid<XML>');
}

#[Test, Expect(FileNotFoundException::class)]
#[Test, Expect(NotFound::class)]
public function setNonExistantXSLFile() {
$this->processor->setXSLFile(':does-no-exist:');
}
Expand Down
1 change: 0 additions & 1 deletion src/test/php/xml/unittest/DomXslProcessorTest.class.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php namespace xml\unittest;

use io\FileNotFoundException;
use lang\{ElementNotFoundException, IllegalArgumentException};
use test\verify\Runtime;
use test\{Assert, Expect, Test};
Expand Down
Loading