qiuwei / jing-trang

Automatically exported from code.google.com/p/jing-trang
Other
1 stars 1 forks source link

NRL and NVDL SchemaImpl#createSubSchema - no entity resolution #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If I am not missing anything obvious,
com.thaiopensource.validate.nrl.SchemaImpl#createSubSchema
and
com.thaiopensource.validate.nvdl.SchemaImpl#createSubSchema
lacks facilities for entity resolution, which will break if a user ships
schemas jarred or similar.

A solution for this problem was created in EpubCheck [1] a while ago (and
the code was forked for this very reason). However, I believe a more
appropriate solution than the one implemented there would be to just hook
up any registered EntityResolver from the PropertyMap param in the
respective SchemaImpl constructor.

Attaching a diff with an outline of suggested changes.

Best regards, /Markus Gylling, DAISY Consortium

[1]
http://code.google.com/p/epubcheck/source/browse/#svn/trunk/com.adobe.epubcheck/
jingsrc

Original issue reported on code.google.com by markus.g...@gmail.com on 30 Oct 2008 at 3:35

Attachments:

GoogleCodeExporter commented 8 years ago
There are many more cases where a custom entity resolver is not used. I believe 
I've
caught all of them in the Validator.nu fork of oNVDL.
(svn co http://svn.versiondude.net/whattf/onvdl/trunk/ onvdl)

Original comment by hsivonen@iki.fi on 3 Nov 2008 at 8:56

GoogleCodeExporter commented 8 years ago
This should now be fixed in the trunk, though I haven't tested it at all yet.

As well as an EntityResolver, it can use a javax.xml.transform.URIResolver 
which is a
rather better match for resolving URIs in RELAX NG/NVDL schemas, and allows for 
the
correct semantics for OASIS XML catalogs. Doing this properly turned out to be 
at
least 10 times more difficult than I expected.

Original comment by jjc.jclark.com on 3 Nov 2008 at 9:20

GoogleCodeExporter commented 8 years ago

Original comment by jjc.jclark.com on 3 Nov 2008 at 9:26

GoogleCodeExporter commented 8 years ago
Please verify.

Original comment by jjc.jclark.com on 7 Nov 2008 at 3:00