You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Paulus Oliver <ol...@siemens.com> on 2006/03/01 09:47:29 UTC

RE: Fw: Xalan-J, Xerces-J XInclude question

Hello Brian,

sounds good to me. In your case I can enable the fixup-base-uri [1]
feature
with the following parameter:

-XMLPARSER
setFeature("http://apache.org/xml/features/xinclude/fixup-base-uris",
false) 

I have a question: Because the reflection code for this feature can be
complicated you
can also use the setFeature(string, boolean) method of e.g.
DocumentBuilderFactory (I
think it is defined in JAXP 1.3).
The user can set the feature with a call like this: -XMLPARSER
featurestring=true and 
you can call the setFeature method with this "feature-string" and true.
The setXIncludeAware feature is new to JAXP 1.3 (I think) - I did not
found it in JAXP 1.2
spec. This feature can be set in xerces with the following feature too:
[2].
Perhaps you can add a new option only for the setXIncludeAware feature
and another for
all xml parser specific "feature strings"?
I think this would be easier to implement comparing to the reflection
code.
What do you think?

[1]
http://xerces.apache.org/xerces2-j/features.html#xinclude.fixup-base-uri
[2] http://xerces.apache.org/xerces2-j/features.html#xinclude

-----Original Message-----
From: Brian Minchau [mailto:minchau@ca.ibm.com] 
Sent: Dienstag, 28. Februar 2006 20:03
To: xalan-dev@xml.apache.org
Subject: Re: Fw: Xalan-J, Xerces-J XInclude question

Oliver,
please look at recent comments that I added to
https://issues.apache.org/jira/browse/XALANJ-2264

The first issue is one of the user interface.  I had suggested an option
something like:

 -XMLPARSER  setXIncludeAware(true)

and to use reflection to turn such options into API calls on the factory
to
set the features.

But there is another issue.... that SAXParserFactory and
DocumentBuilderFactory are created in a number of places in the code.
Perhaps a central place would be better, this allowing a consistent
setting
of options/features.

- Brian



 

             Oliver Paulus

             <oliver@code-proj

             ect.org>
To 
                                       xalan-dev@xml.apache.org

             02/25/2006 07:58
cc 
             AM

 
Subject 
                                       Re: Fw: Xalan-J, Xerces-J
XInclude  
             Please respond to         question

                 xalan-dev

 

 

 

 

 





Hello Brian,

> sorry I didn't pick this up earlier.
No problem. I did not know if the mailinglist was the right one.

> You are interested in using the Process command rather than via some
> JAXP APIs, is that correct?
Yes, I want to use Xalan from the commandline and set XML parser
"features". I
am using Xalan as a normal user and want - if possible - avoid
programming.
At
work I have to develop an XSLT to transform XML to XML. Currently the
XInclude
issue with XML Base (xml:base) is a problem to me because I am not
permitted to modify the target DTD.

The topic you have listed below is only for the XInclude issue - I think
it
would be nice to have a general approach to give Xalan any "passthrough"
parameters for the XML parser. e.g. I call Xalan from the commandline
and Xalan
calls the setFeature (JAXP) Method for the given parameters. Is
something
like
this possible?

Regards
Oliver Paulus
e-mail private: oliver@code-project.org
e-mail work: oliver.paulus@siemens.com

Quoting Brian Minchau <mi...@ca.ibm.com>:

>
> Hi Oliver,
> sorry I didn't pick this up earlier.  The xalan-dev mailing list is
the
> correct one for this issue. You are interested in using the Process
command
> rather than via some JAXP APIs, is that correct?
>
> Recently opened was this JIRA issue which looks to be what you are
> interested in.
> http://issues.apache.org/jira/browse/XALANJ-2264
>
> That issue was opened by Rudolf Weber, but his attached patch is not
robust
> enough to be applied. This issue was discussed at the JIRA meeting and
the
> developers were concerned about the number of possible options in this
> area, so Xalan would probably be more interested in a generic way to
pass
> through parameters to the XML parser rather than XInclude
specifically.
So
> if you have suggestions that would be great.
>
> - Brian
> - - - - - - - - - - - - - - - - - - - -
> Brian Minchau
> XSLT Development, IBM Toronto
> e-mail:        minchau@ca.ibm.com
>
>
>
>             "Paulus Oliver"
>             <oliver.paulus@si
>             emens.com>
To
>                                       <ge...@xml.apache.org>
>             02/24/2006 01:47
cc
>             AM
>
Subject
>                                       RE: Xalan-J, Xerces-J XInclude
>             Please respond to         question
>                  general
>
>
>
>
>
>
>
>
>
> I have made my proposal on the xalan-dev mailing list some days ago
but
> no one replied until now. Do you have any suggestion how to get in
> contact
> with the xalan development team?
>
> Regards
> Oliver Paulus
>
> -----Original Message-----
> From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com]
> Sent: Sonntag, 19. Februar 2006 04:40
> To: general@xml.apache.org
> Subject: RE: Xalan-J, Xerces-J XInclude question
>
> "Paulus Oliver" <ol...@siemens.com> wrote on 02/16/2006
01:40:27
>
> AM:
>
>> Hello Peter,
>>
>> thank you for your help (so far). I have seen in the Xalan java code
>> that there is no option to give him "passthrough" parameters for the
> XML
>> parser (Xerces in this case). I think it could be useful for the
users
> -
>> what do you think?
>
> Sounds useful to me. You might want to start a discussion on the
> xalan-dev
> [1] mailing list.
>
> [1] http://xml.apache.org/mail.html#xalan-dev
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


RE: Fw: Xalan-J, Xerces-J XInclude question

Posted by Oliver Paulus <ol...@code-project.org>.
Here is my sample program:

---START
System.setProperty("javax.xml.parsers.DocumentBuilderFactory","org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
dbfactory.setNamespaceAware(true);
dbfactory.setXIncludeAware(true);
dbfactory.setFeature("http://apache.org/xml/features/xinclude", true);
dbfactory.setFeature("http://apache.org/xml/features/xinclude/fixup-base-uris",
false);

DocumentBuilder parser = dbfactory.newDocumentBuilder();

System.out.println("Namespace aware:" + parser.isNamespaceAware());
System.out.println("XInclude aware:" + parser.isXIncludeAware());

Document document = parser.parse(new File("sourceXMLFilePath"));

Source xmlsource = new DOMSource(document);

TransformerFactory tFactory = TransformerFactory.newInstance();

Transformer transformer = tFactory.newTransformer(new
StreamSource("xslFilePath"));

transformer.transform(xmlsource, new StreamResult(new
FileOutputStream("outputFilePath")));
---END

First I use DocumentBuilderFactory to get a new DOM parser. I set the features
and setXIncludeAware. After that the source file (XML file) will be 
parsed with
this parser instance and this parsed document will be used for transformation.

The program executes and gives the following output:
Namespace aware:true
XInclude aware:true

This means that the parser should use XInclude. But in the result file I get
these lines:
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="otherfile.xml"/>

Means that the transformation does not use XInclude.

If I set the following:
System.setProperty("org.apache.xerces.xni.parser.XMLParserConfiguration","org.apache.xerces.parsers.XIncludeParserConfiguration");
like I do it in the commandline usage the transformation with XInclude works
well but I cannot set the features.

It would be nice if you can give me a hint. I have to develop a small program
which is capable to transform XML with XInclude parser support until Xalan has
the feature on the commandline.

Quoting Oliver Paulus <ol...@code-project.org>:

> I want to understand the Process program. But the Process program is 
> using JAXP
> too - or not? I understand that in the Process program a new
> DocumentBuilderFactory (JAXP) will be made and so on. My problem is I thought
> the DocumentBuilderFactory creates a new DOM parser object (of xalan parser)
> and I can set the fixup-base-uri feature with the setFeature method. 
> Of course
> I have to set the setXIncludeAware too. But this has failed in my tests.
>
> Quoting Brian Minchau <mi...@ca.ibm.com>:
>
>> Oliver,
>> I'm a bit confused. Using the current "Process" program there is no way to
>> set the XInclude option on the XML parser, so I'm not sure what you mean by
>> "a code sample how to use Xalan XSLT transformation with XInclude support
>> ..."
>>
>> You are interested in the "Process" program and not using JAXP, correct?
>>
>> - Brian
>>
>>
>>
>>
>>             Oliver Paulus
>>             <oliver@code-proj
>>             ect.org>                                                   To
>>                                       xalan-dev@xml.apache.org
>>             03/03/2006 12:09                                           cc
>>             PM
>>                                                                   Subject
>>                                       RE: Fw: Xalan-J, Xerces-J XInclude
>>             Please respond to         question
>>                 xalan-dev
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> I have made some investigations according JAXP. I have tried to modify
>> the xalan
>> source code to set the XML parser feature fixup-base-uri with the
>> setFeature
>> method on DocumentBuilderFactory. But the problem is that this option will
>> be
>> ignored. Could you give me a small easy to understand code sample how to
>> use
>> Xalan XSLT transformation with XInclude support and fixup-base-uri
>> feature set?
>> Would be very nice.
>>
>> Oliver Paulus
>>
>> Quoting Paulus Oliver <ol...@siemens.com>:
>>
>>> Hello Brian,
>>>
>>> sounds good to me. In your case I can enable the fixup-base-uri [1]
>>> feature
>>> with the following parameter:
>>>
>>> -XMLPARSER
>>> setFeature("http://apache.org/xml/features/xinclude/fixup-base-uris",
>>> false)
>>>
>>> I have a question: Because the reflection code for this feature can be
>>> complicated you
>>> can also use the setFeature(string, boolean) method of e.g.
>>> DocumentBuilderFactory (I
>>> think it is defined in JAXP 1.3).
>>> The user can set the feature with a call like this: -XMLPARSER
>>> featurestring=true and
>>> you can call the setFeature method with this "feature-string" and true.
>>> The setXIncludeAware feature is new to JAXP 1.3 (I think) - I did not
>>> found it in JAXP 1.2
>>> spec. This feature can be set in xerces with the following feature too:
>>> [2].
>>> Perhaps you can add a new option only for the setXIncludeAware feature
>>> and another for
>>> all xml parser specific "feature strings"?
>>> I think this would be easier to implement comparing to the reflection
>>> code.
>>> What do you think?
>>>
>>> [1]
>>> http://xerces.apache.org/xerces2-j/features.html#xinclude.fixup-base-uri
>>> [2] http://xerces.apache.org/xerces2-j/features.html#xinclude
>>>
>>> -----Original Message-----
>>> From: Brian Minchau [mailto:minchau@ca.ibm.com]
>>> Sent: Dienstag, 28. Februar 2006 20:03
>>> To: xalan-dev@xml.apache.org
>>> Subject: Re: Fw: Xalan-J, Xerces-J XInclude question
>>>
>>> Oliver,
>>> please look at recent comments that I added to
>>> https://issues.apache.org/jira/browse/XALANJ-2264
>>>
>>> The first issue is one of the user interface.  I had suggested an option
>>> something like:
>>>
>>> -XMLPARSER  setXIncludeAware(true)
>>>
>>> and to use reflection to turn such options into API calls on the factory
>>> to
>>> set the features.
>>>
>>> But there is another issue.... that SAXParserFactory and
>>> DocumentBuilderFactory are created in a number of places in the code.
>>> Perhaps a central place would be better, this allowing a consistent
>>> setting
>>> of options/features.
>>>
>>> - Brian
>>>
>>>
>>>
>>>
>>>
>>>             Oliver Paulus
>>>
>>>             <oliver@code-proj
>>>
>>>             ect.org>
>>> To
>>>                                       xalan-dev@xml.apache.org
>>>
>>>             02/25/2006 07:58
>>> cc
>>>             AM
>>>
>>>
>>> Subject
>>>                                       Re: Fw: Xalan-J, Xerces-J
>>> XInclude
>>>             Please respond to         question
>>>
>>>                 xalan-dev
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Hello Brian,
>>>
>>>> sorry I didn't pick this up earlier.
>>> No problem. I did not know if the mailinglist was the right one.
>>>
>>>> You are interested in using the Process command rather than via some
>>>> JAXP APIs, is that correct?
>>> Yes, I want to use Xalan from the commandline and set XML parser
>>> "features". I
>>> am using Xalan as a normal user and want - if possible - avoid
>>> programming.
>>> At
>>> work I have to develop an XSLT to transform XML to XML. Currently the
>>> XInclude
>>> issue with XML Base (xml:base) is a problem to me because I am not
>>> permitted to modify the target DTD.
>>>
>>> The topic you have listed below is only for the XInclude issue - I think
>>> it
>>> would be nice to have a general approach to give Xalan any "passthrough"
>>> parameters for the XML parser. e.g. I call Xalan from the commandline
>>> and Xalan
>>> calls the setFeature (JAXP) Method for the given parameters. Is
>>> something
>>> like
>>> this possible?
>>>
>>> Regards
>>> Oliver Paulus
>>> e-mail private: oliver@code-project.org
>>> e-mail work: oliver.paulus@siemens.com
>>>
>>> Quoting Brian Minchau <mi...@ca.ibm.com>:
>>>
>>>>
>>>> Hi Oliver,
>>>> sorry I didn't pick this up earlier.  The xalan-dev mailing list is
>>> the
>>>> correct one for this issue. You are interested in using the Process
>>> command
>>>> rather than via some JAXP APIs, is that correct?
>>>>
>>>> Recently opened was this JIRA issue which looks to be what you are
>>>> interested in.
>>>> http://issues.apache.org/jira/browse/XALANJ-2264
>>>>
>>>> That issue was opened by Rudolf Weber, but his attached patch is not
>>> robust
>>>> enough to be applied. This issue was discussed at the JIRA meeting and
>>> the
>>>> developers were concerned about the number of possible options in this
>>>> area, so Xalan would probably be more interested in a generic way to
>>> pass
>>>> through parameters to the XML parser rather than XInclude
>>> specifically.
>>> So
>>>> if you have suggestions that would be great.
>>>>
>>>> - Brian
>>>> - - - - - - - - - - - - - - - - - - - -
>>>> Brian Minchau
>>>> XSLT Development, IBM Toronto
>>>> e-mail:        minchau@ca.ibm.com
>>>>
>>>>
>>>>
>>>>             "Paulus Oliver"
>>>>             <oliver.paulus@si
>>>>             emens.com>
>>> To
>>>>                                       <ge...@xml.apache.org>
>>>>             02/24/2006 01:47
>>> cc
>>>>             AM
>>>>
>>> Subject
>>>>                                       RE: Xalan-J, Xerces-J XInclude
>>>>             Please respond to         question
>>>>                  general
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I have made my proposal on the xalan-dev mailing list some days ago
>>> but
>>>> no one replied until now. Do you have any suggestion how to get in
>>>> contact
>>>> with the xalan development team?
>>>>
>>>> Regards
>>>> Oliver Paulus
>>>>
>>>> -----Original Message-----
>>>> From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com]
>>>> Sent: Sonntag, 19. Februar 2006 04:40
>>>> To: general@xml.apache.org
>>>> Subject: RE: Xalan-J, Xerces-J XInclude question
>>>>
>>>> "Paulus Oliver" <ol...@siemens.com> wrote on 02/16/2006
>>> 01:40:27
>>>>
>>>> AM:
>>>>
>>>>> Hello Peter,
>>>>>
>>>>> thank you for your help (so far). I have seen in the Xalan java code
>>>>> that there is no option to give him "passthrough" parameters for the
>>>> XML
>>>>> parser (Xerces in this case). I think it could be useful for the
>>> users
>>>> -
>>>>> what do you think?
>>>>
>>>> Sounds useful to me. You might want to start a discussion on the
>>>> xalan-dev
>>>> [1] mailing list.
>>>>
>>>> [1] http://xml.apache.org/mail.html#xalan-dev
>>>>
>>>> Michael Glavassevich
>>>> XML Parser Development
>>>> IBM Toronto Lab
>>>> E-mail: mrglavas@ca.ibm.com
>>>> E-mail: mrglavas@apache.org
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
>>>> For additional commands, e-mail: general-help@xml.apache.org
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
>>>> For additional commands, e-mail: general-help@xml.apache.org
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>>>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>>
>>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


RE: Fw: Xalan-J, Xerces-J XInclude question

Posted by Oliver Paulus <ol...@code-project.org>.
I want to understand the Process program. But the Process program is 
using JAXP
too - or not? I understand that in the Process program a new
DocumentBuilderFactory (JAXP) will be made and so on. My problem is I thought
the DocumentBuilderFactory creates a new DOM parser object (of xalan parser)
and I can set the fixup-base-uri feature with the setFeature method. Of course
I have to set the setXIncludeAware too. But this has failed in my tests.

Quoting Brian Minchau <mi...@ca.ibm.com>:

> Oliver,
> I'm a bit confused. Using the current "Process" program there is no way to
> set the XInclude option on the XML parser, so I'm not sure what you mean by
> "a code sample how to use Xalan XSLT transformation with XInclude support
> ..."
>
> You are interested in the "Process" program and not using JAXP, correct?
>
> - Brian
>
>
>
>
>             Oliver Paulus
>             <oliver@code-proj
>             ect.org>                                                   To
>                                       xalan-dev@xml.apache.org
>             03/03/2006 12:09                                           cc
>             PM
>                                                                   Subject
>                                       RE: Fw: Xalan-J, Xerces-J XInclude
>             Please respond to         question
>                 xalan-dev
>
>
>
>
>
>
>
>
>
> I have made some investigations according JAXP. I have tried to modify
> the xalan
> source code to set the XML parser feature fixup-base-uri with the
> setFeature
> method on DocumentBuilderFactory. But the problem is that this option will
> be
> ignored. Could you give me a small easy to understand code sample how to
> use
> Xalan XSLT transformation with XInclude support and fixup-base-uri
> feature set?
> Would be very nice.
>
> Oliver Paulus
>
> Quoting Paulus Oliver <ol...@siemens.com>:
>
>> Hello Brian,
>>
>> sounds good to me. In your case I can enable the fixup-base-uri [1]
>> feature
>> with the following parameter:
>>
>> -XMLPARSER
>> setFeature("http://apache.org/xml/features/xinclude/fixup-base-uris",
>> false)
>>
>> I have a question: Because the reflection code for this feature can be
>> complicated you
>> can also use the setFeature(string, boolean) method of e.g.
>> DocumentBuilderFactory (I
>> think it is defined in JAXP 1.3).
>> The user can set the feature with a call like this: -XMLPARSER
>> featurestring=true and
>> you can call the setFeature method with this "feature-string" and true.
>> The setXIncludeAware feature is new to JAXP 1.3 (I think) - I did not
>> found it in JAXP 1.2
>> spec. This feature can be set in xerces with the following feature too:
>> [2].
>> Perhaps you can add a new option only for the setXIncludeAware feature
>> and another for
>> all xml parser specific "feature strings"?
>> I think this would be easier to implement comparing to the reflection
>> code.
>> What do you think?
>>
>> [1]
>> http://xerces.apache.org/xerces2-j/features.html#xinclude.fixup-base-uri
>> [2] http://xerces.apache.org/xerces2-j/features.html#xinclude
>>
>> -----Original Message-----
>> From: Brian Minchau [mailto:minchau@ca.ibm.com]
>> Sent: Dienstag, 28. Februar 2006 20:03
>> To: xalan-dev@xml.apache.org
>> Subject: Re: Fw: Xalan-J, Xerces-J XInclude question
>>
>> Oliver,
>> please look at recent comments that I added to
>> https://issues.apache.org/jira/browse/XALANJ-2264
>>
>> The first issue is one of the user interface.  I had suggested an option
>> something like:
>>
>> -XMLPARSER  setXIncludeAware(true)
>>
>> and to use reflection to turn such options into API calls on the factory
>> to
>> set the features.
>>
>> But there is another issue.... that SAXParserFactory and
>> DocumentBuilderFactory are created in a number of places in the code.
>> Perhaps a central place would be better, this allowing a consistent
>> setting
>> of options/features.
>>
>> - Brian
>>
>>
>>
>>
>>
>>             Oliver Paulus
>>
>>             <oliver@code-proj
>>
>>             ect.org>
>> To
>>                                       xalan-dev@xml.apache.org
>>
>>             02/25/2006 07:58
>> cc
>>             AM
>>
>>
>> Subject
>>                                       Re: Fw: Xalan-J, Xerces-J
>> XInclude
>>             Please respond to         question
>>
>>                 xalan-dev
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Hello Brian,
>>
>>> sorry I didn't pick this up earlier.
>> No problem. I did not know if the mailinglist was the right one.
>>
>>> You are interested in using the Process command rather than via some
>>> JAXP APIs, is that correct?
>> Yes, I want to use Xalan from the commandline and set XML parser
>> "features". I
>> am using Xalan as a normal user and want - if possible - avoid
>> programming.
>> At
>> work I have to develop an XSLT to transform XML to XML. Currently the
>> XInclude
>> issue with XML Base (xml:base) is a problem to me because I am not
>> permitted to modify the target DTD.
>>
>> The topic you have listed below is only for the XInclude issue - I think
>> it
>> would be nice to have a general approach to give Xalan any "passthrough"
>> parameters for the XML parser. e.g. I call Xalan from the commandline
>> and Xalan
>> calls the setFeature (JAXP) Method for the given parameters. Is
>> something
>> like
>> this possible?
>>
>> Regards
>> Oliver Paulus
>> e-mail private: oliver@code-project.org
>> e-mail work: oliver.paulus@siemens.com
>>
>> Quoting Brian Minchau <mi...@ca.ibm.com>:
>>
>>>
>>> Hi Oliver,
>>> sorry I didn't pick this up earlier.  The xalan-dev mailing list is
>> the
>>> correct one for this issue. You are interested in using the Process
>> command
>>> rather than via some JAXP APIs, is that correct?
>>>
>>> Recently opened was this JIRA issue which looks to be what you are
>>> interested in.
>>> http://issues.apache.org/jira/browse/XALANJ-2264
>>>
>>> That issue was opened by Rudolf Weber, but his attached patch is not
>> robust
>>> enough to be applied. This issue was discussed at the JIRA meeting and
>> the
>>> developers were concerned about the number of possible options in this
>>> area, so Xalan would probably be more interested in a generic way to
>> pass
>>> through parameters to the XML parser rather than XInclude
>> specifically.
>> So
>>> if you have suggestions that would be great.
>>>
>>> - Brian
>>> - - - - - - - - - - - - - - - - - - - -
>>> Brian Minchau
>>> XSLT Development, IBM Toronto
>>> e-mail:        minchau@ca.ibm.com
>>>
>>>
>>>
>>>             "Paulus Oliver"
>>>             <oliver.paulus@si
>>>             emens.com>
>> To
>>>                                       <ge...@xml.apache.org>
>>>             02/24/2006 01:47
>> cc
>>>             AM
>>>
>> Subject
>>>                                       RE: Xalan-J, Xerces-J XInclude
>>>             Please respond to         question
>>>                  general
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> I have made my proposal on the xalan-dev mailing list some days ago
>> but
>>> no one replied until now. Do you have any suggestion how to get in
>>> contact
>>> with the xalan development team?
>>>
>>> Regards
>>> Oliver Paulus
>>>
>>> -----Original Message-----
>>> From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com]
>>> Sent: Sonntag, 19. Februar 2006 04:40
>>> To: general@xml.apache.org
>>> Subject: RE: Xalan-J, Xerces-J XInclude question
>>>
>>> "Paulus Oliver" <ol...@siemens.com> wrote on 02/16/2006
>> 01:40:27
>>>
>>> AM:
>>>
>>>> Hello Peter,
>>>>
>>>> thank you for your help (so far). I have seen in the Xalan java code
>>>> that there is no option to give him "passthrough" parameters for the
>>> XML
>>>> parser (Xerces in this case). I think it could be useful for the
>> users
>>> -
>>>> what do you think?
>>>
>>> Sounds useful to me. You might want to start a discussion on the
>>> xalan-dev
>>> [1] mailing list.
>>>
>>> [1] http://xml.apache.org/mail.html#xalan-dev
>>>
>>> Michael Glavassevich
>>> XML Parser Development
>>> IBM Toronto Lab
>>> E-mail: mrglavas@ca.ibm.com
>>> E-mail: mrglavas@apache.org
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
>>> For additional commands, e-mail: general-help@xml.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
>>> For additional commands, e-mail: general-help@xml.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>>
>>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


RE: Fw: Xalan-J, Xerces-J XInclude question

Posted by Brian Minchau <mi...@ca.ibm.com>.
Oliver,
I'm a bit confused. Using the current "Process" program there is no way to
set the XInclude option on the XML parser, so I'm not sure what you mean by
"a code sample how to use Xalan XSLT transformation with XInclude support
..."

You are interested in the "Process" program and not using JAXP, correct?

- Brian



                                                                           
             Oliver Paulus                                                 
             <oliver@code-proj                                             
             ect.org>                                                   To 
                                       xalan-dev@xml.apache.org            
             03/03/2006 12:09                                           cc 
             PM                                                            
                                                                   Subject 
                                       RE: Fw: Xalan-J, Xerces-J XInclude  
             Please respond to         question                            
                 xalan-dev                                                 
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




I have made some investigations according JAXP. I have tried to modify
the xalan
source code to set the XML parser feature fixup-base-uri with the
setFeature
method on DocumentBuilderFactory. But the problem is that this option will
be
ignored. Could you give me a small easy to understand code sample how to
use
Xalan XSLT transformation with XInclude support and fixup-base-uri
feature set?
Would be very nice.

Oliver Paulus

Quoting Paulus Oliver <ol...@siemens.com>:

> Hello Brian,
>
> sounds good to me. In your case I can enable the fixup-base-uri [1]
> feature
> with the following parameter:
>
> -XMLPARSER
> setFeature("http://apache.org/xml/features/xinclude/fixup-base-uris",
> false)
>
> I have a question: Because the reflection code for this feature can be
> complicated you
> can also use the setFeature(string, boolean) method of e.g.
> DocumentBuilderFactory (I
> think it is defined in JAXP 1.3).
> The user can set the feature with a call like this: -XMLPARSER
> featurestring=true and
> you can call the setFeature method with this "feature-string" and true.
> The setXIncludeAware feature is new to JAXP 1.3 (I think) - I did not
> found it in JAXP 1.2
> spec. This feature can be set in xerces with the following feature too:
> [2].
> Perhaps you can add a new option only for the setXIncludeAware feature
> and another for
> all xml parser specific "feature strings"?
> I think this would be easier to implement comparing to the reflection
> code.
> What do you think?
>
> [1]
> http://xerces.apache.org/xerces2-j/features.html#xinclude.fixup-base-uri
> [2] http://xerces.apache.org/xerces2-j/features.html#xinclude
>
> -----Original Message-----
> From: Brian Minchau [mailto:minchau@ca.ibm.com]
> Sent: Dienstag, 28. Februar 2006 20:03
> To: xalan-dev@xml.apache.org
> Subject: Re: Fw: Xalan-J, Xerces-J XInclude question
>
> Oliver,
> please look at recent comments that I added to
> https://issues.apache.org/jira/browse/XALANJ-2264
>
> The first issue is one of the user interface.  I had suggested an option
> something like:
>
> -XMLPARSER  setXIncludeAware(true)
>
> and to use reflection to turn such options into API calls on the factory
> to
> set the features.
>
> But there is another issue.... that SAXParserFactory and
> DocumentBuilderFactory are created in a number of places in the code.
> Perhaps a central place would be better, this allowing a consistent
> setting
> of options/features.
>
> - Brian
>
>
>
>
>
>             Oliver Paulus
>
>             <oliver@code-proj
>
>             ect.org>
> To
>                                       xalan-dev@xml.apache.org
>
>             02/25/2006 07:58
> cc
>             AM
>
>
> Subject
>                                       Re: Fw: Xalan-J, Xerces-J
> XInclude
>             Please respond to         question
>
>                 xalan-dev
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Hello Brian,
>
>> sorry I didn't pick this up earlier.
> No problem. I did not know if the mailinglist was the right one.
>
>> You are interested in using the Process command rather than via some
>> JAXP APIs, is that correct?
> Yes, I want to use Xalan from the commandline and set XML parser
> "features". I
> am using Xalan as a normal user and want - if possible - avoid
> programming.
> At
> work I have to develop an XSLT to transform XML to XML. Currently the
> XInclude
> issue with XML Base (xml:base) is a problem to me because I am not
> permitted to modify the target DTD.
>
> The topic you have listed below is only for the XInclude issue - I think
> it
> would be nice to have a general approach to give Xalan any "passthrough"
> parameters for the XML parser. e.g. I call Xalan from the commandline
> and Xalan
> calls the setFeature (JAXP) Method for the given parameters. Is
> something
> like
> this possible?
>
> Regards
> Oliver Paulus
> e-mail private: oliver@code-project.org
> e-mail work: oliver.paulus@siemens.com
>
> Quoting Brian Minchau <mi...@ca.ibm.com>:
>
>>
>> Hi Oliver,
>> sorry I didn't pick this up earlier.  The xalan-dev mailing list is
> the
>> correct one for this issue. You are interested in using the Process
> command
>> rather than via some JAXP APIs, is that correct?
>>
>> Recently opened was this JIRA issue which looks to be what you are
>> interested in.
>> http://issues.apache.org/jira/browse/XALANJ-2264
>>
>> That issue was opened by Rudolf Weber, but his attached patch is not
> robust
>> enough to be applied. This issue was discussed at the JIRA meeting and
> the
>> developers were concerned about the number of possible options in this
>> area, so Xalan would probably be more interested in a generic way to
> pass
>> through parameters to the XML parser rather than XInclude
> specifically.
> So
>> if you have suggestions that would be great.
>>
>> - Brian
>> - - - - - - - - - - - - - - - - - - - -
>> Brian Minchau
>> XSLT Development, IBM Toronto
>> e-mail:        minchau@ca.ibm.com
>>
>>
>>
>>             "Paulus Oliver"
>>             <oliver.paulus@si
>>             emens.com>
> To
>>                                       <ge...@xml.apache.org>
>>             02/24/2006 01:47
> cc
>>             AM
>>
> Subject
>>                                       RE: Xalan-J, Xerces-J XInclude
>>             Please respond to         question
>>                  general
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> I have made my proposal on the xalan-dev mailing list some days ago
> but
>> no one replied until now. Do you have any suggestion how to get in
>> contact
>> with the xalan development team?
>>
>> Regards
>> Oliver Paulus
>>
>> -----Original Message-----
>> From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com]
>> Sent: Sonntag, 19. Februar 2006 04:40
>> To: general@xml.apache.org
>> Subject: RE: Xalan-J, Xerces-J XInclude question
>>
>> "Paulus Oliver" <ol...@siemens.com> wrote on 02/16/2006
> 01:40:27
>>
>> AM:
>>
>>> Hello Peter,
>>>
>>> thank you for your help (so far). I have seen in the Xalan java code
>>> that there is no option to give him "passthrough" parameters for the
>> XML
>>> parser (Xerces in this case). I think it could be useful for the
> users
>> -
>>> what do you think?
>>
>> Sounds useful to me. You might want to start a discussion on the
>> xalan-dev
>> [1] mailing list.
>>
>> [1] http://xml.apache.org/mail.html#xalan-dev
>>
>> Michael Glavassevich
>> XML Parser Development
>> IBM Toronto Lab
>> E-mail: mrglavas@ca.ibm.com
>> E-mail: mrglavas@apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
>> For additional commands, e-mail: general-help@xml.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
>> For additional commands, e-mail: general-help@xml.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


RE: Fw: Xalan-J, Xerces-J XInclude question

Posted by Oliver Paulus <ol...@code-project.org>.
I have made some investigations according JAXP. I have tried to modify 
the xalan
source code to set the XML parser feature fixup-base-uri with the setFeature
method on DocumentBuilderFactory. But the problem is that this option will be
ignored. Could you give me a small easy to understand code sample how to use
Xalan XSLT transformation with XInclude support and fixup-base-uri 
feature set?
Would be very nice.

Oliver Paulus

Quoting Paulus Oliver <ol...@siemens.com>:

> Hello Brian,
>
> sounds good to me. In your case I can enable the fixup-base-uri [1]
> feature
> with the following parameter:
>
> -XMLPARSER
> setFeature("http://apache.org/xml/features/xinclude/fixup-base-uris",
> false)
>
> I have a question: Because the reflection code for this feature can be
> complicated you
> can also use the setFeature(string, boolean) method of e.g.
> DocumentBuilderFactory (I
> think it is defined in JAXP 1.3).
> The user can set the feature with a call like this: -XMLPARSER
> featurestring=true and
> you can call the setFeature method with this "feature-string" and true.
> The setXIncludeAware feature is new to JAXP 1.3 (I think) - I did not
> found it in JAXP 1.2
> spec. This feature can be set in xerces with the following feature too:
> [2].
> Perhaps you can add a new option only for the setXIncludeAware feature
> and another for
> all xml parser specific "feature strings"?
> I think this would be easier to implement comparing to the reflection
> code.
> What do you think?
>
> [1]
> http://xerces.apache.org/xerces2-j/features.html#xinclude.fixup-base-uri
> [2] http://xerces.apache.org/xerces2-j/features.html#xinclude
>
> -----Original Message-----
> From: Brian Minchau [mailto:minchau@ca.ibm.com]
> Sent: Dienstag, 28. Februar 2006 20:03
> To: xalan-dev@xml.apache.org
> Subject: Re: Fw: Xalan-J, Xerces-J XInclude question
>
> Oliver,
> please look at recent comments that I added to
> https://issues.apache.org/jira/browse/XALANJ-2264
>
> The first issue is one of the user interface.  I had suggested an option
> something like:
>
> -XMLPARSER  setXIncludeAware(true)
>
> and to use reflection to turn such options into API calls on the factory
> to
> set the features.
>
> But there is another issue.... that SAXParserFactory and
> DocumentBuilderFactory are created in a number of places in the code.
> Perhaps a central place would be better, this allowing a consistent
> setting
> of options/features.
>
> - Brian
>
>
>
>
>
>             Oliver Paulus
>
>             <oliver@code-proj
>
>             ect.org>
> To
>                                       xalan-dev@xml.apache.org
>
>             02/25/2006 07:58
> cc
>             AM
>
>
> Subject
>                                       Re: Fw: Xalan-J, Xerces-J
> XInclude
>             Please respond to         question
>
>                 xalan-dev
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Hello Brian,
>
>> sorry I didn't pick this up earlier.
> No problem. I did not know if the mailinglist was the right one.
>
>> You are interested in using the Process command rather than via some
>> JAXP APIs, is that correct?
> Yes, I want to use Xalan from the commandline and set XML parser
> "features". I
> am using Xalan as a normal user and want - if possible - avoid
> programming.
> At
> work I have to develop an XSLT to transform XML to XML. Currently the
> XInclude
> issue with XML Base (xml:base) is a problem to me because I am not
> permitted to modify the target DTD.
>
> The topic you have listed below is only for the XInclude issue - I think
> it
> would be nice to have a general approach to give Xalan any "passthrough"
> parameters for the XML parser. e.g. I call Xalan from the commandline
> and Xalan
> calls the setFeature (JAXP) Method for the given parameters. Is
> something
> like
> this possible?
>
> Regards
> Oliver Paulus
> e-mail private: oliver@code-project.org
> e-mail work: oliver.paulus@siemens.com
>
> Quoting Brian Minchau <mi...@ca.ibm.com>:
>
>>
>> Hi Oliver,
>> sorry I didn't pick this up earlier.  The xalan-dev mailing list is
> the
>> correct one for this issue. You are interested in using the Process
> command
>> rather than via some JAXP APIs, is that correct?
>>
>> Recently opened was this JIRA issue which looks to be what you are
>> interested in.
>> http://issues.apache.org/jira/browse/XALANJ-2264
>>
>> That issue was opened by Rudolf Weber, but his attached patch is not
> robust
>> enough to be applied. This issue was discussed at the JIRA meeting and
> the
>> developers were concerned about the number of possible options in this
>> area, so Xalan would probably be more interested in a generic way to
> pass
>> through parameters to the XML parser rather than XInclude
> specifically.
> So
>> if you have suggestions that would be great.
>>
>> - Brian
>> - - - - - - - - - - - - - - - - - - - -
>> Brian Minchau
>> XSLT Development, IBM Toronto
>> e-mail:        minchau@ca.ibm.com
>>
>>
>>
>>             "Paulus Oliver"
>>             <oliver.paulus@si
>>             emens.com>
> To
>>                                       <ge...@xml.apache.org>
>>             02/24/2006 01:47
> cc
>>             AM
>>
> Subject
>>                                       RE: Xalan-J, Xerces-J XInclude
>>             Please respond to         question
>>                  general
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> I have made my proposal on the xalan-dev mailing list some days ago
> but
>> no one replied until now. Do you have any suggestion how to get in
>> contact
>> with the xalan development team?
>>
>> Regards
>> Oliver Paulus
>>
>> -----Original Message-----
>> From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com]
>> Sent: Sonntag, 19. Februar 2006 04:40
>> To: general@xml.apache.org
>> Subject: RE: Xalan-J, Xerces-J XInclude question
>>
>> "Paulus Oliver" <ol...@siemens.com> wrote on 02/16/2006
> 01:40:27
>>
>> AM:
>>
>>> Hello Peter,
>>>
>>> thank you for your help (so far). I have seen in the Xalan java code
>>> that there is no option to give him "passthrough" parameters for the
>> XML
>>> parser (Xerces in this case). I think it could be useful for the
> users
>> -
>>> what do you think?
>>
>> Sounds useful to me. You might want to start a discussion on the
>> xalan-dev
>> [1] mailing list.
>>
>> [1] http://xml.apache.org/mail.html#xalan-dev
>>
>> Michael Glavassevich
>> XML Parser Development
>> IBM Toronto Lab
>> E-mail: mrglavas@ca.ibm.com
>> E-mail: mrglavas@apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
>> For additional commands, e-mail: general-help@xml.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
>> For additional commands, e-mail: general-help@xml.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org