* Copyright (c) 2012, Francis Galiegue <email@example.com>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Lesser GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Lesser GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
In this example, we register a custom schema into our factory with a given URI, and initiate the schema instance using that URI.
The only necessary condition for the URI is for it to be an absolute JSON
), and you can register as many
schemas as you want. Here, we register both schemas from
You will notice that the scheme for these URIs is
xxx: it does not
matter in the slightest that it is not a supported scheme by default, the
schema is registered all the same.
This also shows that reference resolution still works in such a case,
mntent schema is referred to via a relative URI from the