From 9d4cb9e33b9dcbd26ace2e3d4e4729181e463388 Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 27 Aug 2006 18:33:37 +0000 Subject: [PATCH] New handwritten XMS schema for install.xml files, generator is fixed to link it too. It is not doing all the checks as XMLDB editor from contrib, but it helps to detect basic problems in general XML editors - such as the one in Eclipse ;-) It can serve also as basic documentation of the install.xml format. --- lib/xmldb/classes/XMLDBStructure.class.php | 6 +- lib/xmldb/xmldb.xsd | 205 +++++++++++---------- 2 files changed, 110 insertions(+), 101 deletions(-) diff --git a/lib/xmldb/classes/XMLDBStructure.class.php b/lib/xmldb/classes/XMLDBStructure.class.php index f9086e782e..46a28e2b8d 100644 --- a/lib/xmldb/classes/XMLDBStructure.class.php +++ b/lib/xmldb/classes/XMLDBStructure.class.php @@ -478,8 +478,12 @@ class XMLDBStructure extends XMLDBObject { $o.= 'version . '"'; if ($this->comment) { - $o.= ' COMMENT="' . htmlspecialchars($this->comment) . '"'; + $o.= ' COMMENT="' . htmlspecialchars($this->comment) . '"'."\n"; } + $rel = array_fill(0, count(explode('/', $this->path)), '..'); + $rel = implode('/', $rel); + $o.= ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'."\n"; + $o.= ' xsi:noNamespaceSchemaLocation="'.$rel.'/lib/xmldb/xmldb.xsd"'."\n"; $o.= '>' . "\n"; /// Now the tables if ($this->tables) { diff --git a/lib/xmldb/xmldb.xsd b/lib/xmldb/xmldb.xsd index ace9053522..0829bb1b29 100644 --- a/lib/xmldb/xmldb.xsd +++ b/lib/xmldb/xmldb.xsd @@ -1,59 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -67,19 +91,12 @@ + + + + - - - - - - - - - - - - + @@ -93,28 +110,14 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + @@ -145,17 +148,19 @@ - - - - + + + + + + - + @@ -164,13 +169,13 @@ - + - - - - + + + + @@ -185,12 +190,12 @@ - - + + - - - + + + -- 2.39.5