The changes for issue 64 looks good to me (besides the following one
small bug), but because the branch contains fixes for both 64 and 62,
and because I have a compatibility concern about issue 62, I cannot
merge this branch into the trunk right away.
Would it be possible to do issue 62 as a plugin?
Comment inline:
lexi_at_dev.java.net wrote:
> Tag: issue-62_64
> User: lexi
> Date: 2005/06/20 10:49:28
>
> Log:
> Issue number: 62
> Submitted by: lexi
>
> Added BIXPluginCustomization.
>
> File Changes:
>
> Directory: /jaxb-sources/jaxb-ri/xjc/src/com/sun/tools/xjc/reader/xmlschema/bindinfo/
> =====================================================================================
>
> File [changed]: binding.rng
> Url: https://jaxb-sources.dev.java.net/source/browse/jaxb-sources/jaxb-ri/xjc/src/com/sun/tools/xjc/reader/xmlschema/bindinfo/binding.rng?r1=1.1&r2=1.1.2.1
> Delta lines: +24 -4
> --------------------
> --- binding.rng 25 Jun 2004 21:15:13 -0000 1.1
> +++ binding.rng 20 Jun 2005 17:49:25 -0000 1.1.2.1
> @@ -75,13 +80,28 @@
> <anyName><except>
> <nsName ns="&XJCURI;"/>
> <nsName /> <!-- except XML Schema elements -->
> + <nsName ns="http://www.w3.org/2001/XMLSchema"/>
> </except></anyName>
> - <!-- TODO: check if this namespace is allowed -->
> - <!-- for now, ignore the entire sub-tree -->
> - $runtime.redirectSubtree(
> - new DefaultHandler(),$uri,$localName,$qname);
> +
> +// if($runtime.isExtensionURI($uri)) {
> + if(true) {
> + // parse this sub-tree as an extension
> + try {
> + sax2dom = new SAX2DOMEx();
> + } catch( ParserConfigurationException e ) {
> + throw new Error(e); // impossible
> + }
> + $runtime.redirectSubtree(sax2dom,$uri,$localName,$qname);
> + } else {
> + // ignore this sub-tree
> + sax2dom = null;
> + $runtime.redirectSubtree(new DefaultHandler(),$uri,$localName,$qname);
> + }
> <empty/>
> <p:ignore><ref name="anyContents"/></p:ignore>
> + if(sax2dom!=null) {
> + bi.addDecl(new BIXPluginCustomization(((Document)sax2dom.getDOM()).getDocumentElement(),$runtime.copyLocator()));
I think you want to set sax2dom to null again here.
> + }
> </element>
> <text/>
> </choice>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cvs-unsubscribe_at_jaxb-sources.dev.java.net
> For additional commands, e-mail: cvs-help_at_jaxb-sources.dev.java.net
>
>
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com