[ 
http://issues.apache.org/jira/browse/XALANJ-2264?page=comments#action_12364644 
] 

Brian Minchau commented on XALANJ-2264:
---------------------------------------

I wrote this to the xalan-dev mailing in response to Rudolf's post, before he 
created this issue:

Rudolf,


The DocumentBuilderFactory method setXIncludeAware() has existed since JAXP 
1.3, which is what Xalan-J supports, so all in all I'm in favour of your patch, 
and with the new functionality, it just needs a little polishing.

Your  request looks perfectly reasonable to me. I had a look at the class 
javax.xml.parsers.DocumentBuilderFactory. Amoung its methods is this one:
    public void setXIncludeAware(boolean b);

Already in use by Xalan code, in various places are these methods on the same 
class:
    public abstract void setAttribute(String s, Object o);
    public abstract void setFeature(String s, boolean b);
    public void setNamespaceAware(boolean b);
    public void setValidating(boolean b);

It looks to me like having a command line option to call 
setXIncludeAware(boolean b) as you suggest is reasonable. However the current 
behavior is that the factory is not XInclude aware. So I don't agree that the 
default value should be true your variable
    boolean isXIncludeAware = true;

Your patch has some messages in German (sehr interresant, aber es gibt viele 
andere Sprachen). Excuse my rusty German, but there are other languages so we 
would might use the English messages but leave the translation to the usual 
processes.  However, the one area in you patch which really needs a message is 
this one:


                       try
                       {
                                   dfactory.setXIncludeAware(isXIncludeAware);
                       }
                       catch(UnsupportedOperationException uoe)
                       {

                       }

If a DocumentBuilderFactory doesn't support this API it will throw the 
UnsupportedOperationException, yet your patch would silently absorb the 
exception. An informational message that the API is not supported would be 
useful when someone wants to use the new options but they don't seem to work. 
Class path issues can be tricky and they might not be using the factory they 
expect, so a message here would be very useful.



> Supporting xi:include on xalan command-line
> -------------------------------------------
>
>          Key: XALANJ-2264
>          URL: http://issues.apache.org/jira/browse/XALANJ-2264
>      Project: XalanJ2
>         Type: New Feature
>   Components: Xalan-CmdLine
>     Versions: Latest Development Code
>  Environment: all
>     Reporter: Rudolf Weber
>  Attachments: xalan-xi.patch.txt
>
> The xi:include-awareness should be specifiable on the command-line.
> The default is on, since I think in the normal case it is useful.
> In the special case, the default has to be swiched off with -NIA.
>  (Of course, it may be good keep the current behavior on default. I think, 
> that the xi:include is not in wide use, so I want to risk to change the 
> default. )
> In our project we want to include declarations in a programming language
> in the xslt-file, so the option -XSLIA.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to