[ANNOUNCE] CFP open for ApacheCon North America 2016

2015-11-25 Thread Rich Bowen
Community growth starts by talking with those interested in your
project. ApacheCon North America is coming, are you?

We are delighted to announce that the Call For Presentations (CFP) is
now open for ApacheCon North America. You can submit your proposed
sessions at
http://events.linuxfoundation.org/events/apache-big-data-north-america/program/cfp
for big data talks and
http://events.linuxfoundation.org/events/apachecon-north-america/program/cfp
for all other topics.

ApacheCon North America will be held in Vancouver, Canada, May 9-13th
2016. ApacheCon has been running every year since 2000, and is the place
to build your project communities.

While we will consider individual talks we prefer to see related
sessions that are likely to draw users and community members. When
submitting your talk work with your project community and with related
communities to come up with a full program that will walk attendees
through the basics and on into mastery of your project in example use
cases. Content that introduces what's new in your latest release is also
of particular interest, especially when it builds upon existing well
know application models. The goal should be to showcase your project in
ways that will attract participants and encourage engagement in your
community, Please remember to involve your whole project community (user
and dev lists) when building content. This is your chance to create a
project specific event within the broader ApacheCon conference.

Content at ApacheCon North America will be cross-promoted as
mini-conferences, such as ApacheCon Big Data, and ApacheCon Mobile, so
be sure to indicate which larger category your proposed sessions fit into.

Finally, please plan to attend ApacheCon, even if you're not proposing a
talk. The biggest value of the event is community building, and we count
on you to make it a place where your project community is likely to
congregate, not just for the technical content in sessions, but for
hackathons, project summits, and good old fashioned face-to-face networking.

-- 
rbo...@apache.org
http://apache.org/

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Fwd: Parse XML configuration file with namespaces

2015-11-25 Thread Oliver Heger
Hi Maurizio,

you are probably affected by this bug:

https://issues.apache.org/jira/browse/CONFIGURATION-573

It has been fixed for the upcoming 2.0 release, but is not available for
Configuration 1.10. I fear, you will have to use the default expression
engine for the time being :-(

Oliver

Am 25.11.2015 um 09:37 schrieb Maurizio Lattuada:
> Hi @all,
> 
> 
> @Siegfried: all my XSD files are stored locally. In fact, when I call
> the "load()" method (setSchemaValidation is true), the XML is loaded
> correctly. By the way, I introduced on purpose some errors in the XML
> file and it was not correctly loaded, meaning that the validation is
> really active and working (so, XSD files are correctly found).
> 
> @Oliver: thanks for the hint, but I think there is a strange behavior
> in my opinion.
> 
> Iterator it = xmlPersonConfiguration.getKeys();
> while (it.hasNext()) {
> LOGGER.info(it.next());
> }
> final String string = namespace + Tags.PERSON; // namespace is a
> parameter equals to "p:"
> xmlPerson = xmlPersonConfiguration.configurationsAt(string);
> LOGGER.info("--> Found " + xmlPerson.size() + " persons (key: " +
> string + ")");
> 
> This lead to have:
> 2015-11-25 09:08:10,320 [c.v.t.b.r.ConfigReader:402  ] INFO  -
> parsePerson : p:person/p:title
> 2015-11-25 09:08:10,324 [c.v.t.b.r.ConfigReader:402  ] INFO  -
> parsePerson : p:person/p:firstName
> 2015-11-25 09:08:10,326 [c.v.t.b.r.ConfigReader:402  ] INFO  -
> parsePerson : p:person/p:lastName
> ...all the tags here are correctly logged...
> 2015-11-25 09:08:10,346 [c.v.t.b.r.ConfigReader:402  ] INFO  -
> parsePerson : @xmlns:ath
> 2015-11-25 09:08:10,346 [c.v.t.b.r.ConfigReader:402  ] INFO  -
> parsePerson : @xmlns:com
> 2015-11-25 09:08:10,346 [c.v.t.b.r.ConfigReader:402  ] INFO  -
> parsePerson : @xmlns:p
> 2015-11-25 09:08:10,347 [c.v.t.b.r.ConfigReader:402  ] INFO  -
> parsePerson : @xmlns:xsi
> 2015-11-25 09:08:10,347 [c.v.t.b.r.ConfigReader:402  ] INFO  -
> parsePerson : @xsi:schemaLocation
> 2015-11-25 09:08:10,720 [c.v.t.b.r.ConfigReader:406  ] INFO  -
> parsePerson :  --> Found 0 persons (key: p:person)
> 
> Question: since my xml file has this structure (I omit the namespace
> declaration for ease of reading):
> 
>   
> ...
> ...
>   
>   
> ...
> ...
>   
> 
> 
> Why "p:person" is not in the keys, but only the sub-tags of p:person?
> When I had my xml with the XSD, but without namespaces, looking for
> "person" worked fine, so I was able to iterate on the 2 persons
> available in the XML example above.
> 
> By the way, I also tried to look for "p:person/p:title", that is a key
> found by calling the "getKeys()" method:
> xmlPerson = xmlPersonConfiguration.configurationsAt("p:person/p:title");
> LOGGER.info("--> Found " + xmlPerson.size() + " persons");
> 
> but the xmlPerson.size is always equal to 0.
> FYI xmlPersonConfiguration is created and initialized as:
> 
> XMLConfiguration xmlPersonConfiguration = new XMLConfiguration();
> xmlPersonConfiguration.setExpressionEngine(new
> XPathExpressionEngine());
> xmlPersonConfiguration.setSchemaValidation(true);
> xmlPersonConfiguration.setFileName("...");
> xmlPersonConfiguration.load();
> 
> If I don't call the "setExpressionEngine" method and I search for tags
> like "p:person.p:title" or "p:person", all these entries are correctly
> found and I can iterate over them.
> 
> Any other suggestions?
> 
> 
> thanks in advance for the feedback.
> 
> 2015-11-24 21:26 GMT+01:00 Oliver Heger :
>> Hi Maurizio,
>>
>> in order to debug your problem, you can call the configuration's
>> getKeys() method. From the iterator returned you should see the
>> available keys. These keys can then also be used for querying properties.
>>
>> HTH
>> Oliver
>>
>> Am 24.11.2015 um 13:54 schrieb Maurizio Lattuada:
>>> Hi guys,
>>>
>>> I'm dealing with a strange problem while parsing an XML file (with
>>> namespaces) using commons configuration 1.10.
>>> First of all, let me say that when I call the "load()" method on the
>>> following XML file (validation is active), it is loaded flawless.
>>>
>>> This is an extract of the xml to be parsed:
>>> 
>>> 
>>> >> action="create"
>>> xmlns:ath="tdm:configuration:authentication"
>>> xmlns:com="tdm:configuration:common"
>>> xmlns:p="tdm:configuration:entities"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>>> xsi:schemaLocation="tdm:configuration:entities ../xsd/model/persons.xsd 
>>> ">
>>> 
>>> Dr.
>>> ...
>>> 
>>> 
>>> Mr.
>>> ...
>>> 
>>> 
>>>
>>> This is an extract of the persons.xsd, as you can see there are a
>>> couple of imports
>>> 
>>> >> xmlns:common="tdm:configuration:common"
>>> xmlns:authentication="tdm:configuration:authentication"
>>> targetNamespace="tdm:configuration:entities"
>>> 

Re: Fwd: Parse XML configuration file with namespaces

2015-11-25 Thread Maurizio Lattuada
Hi @all,


@Siegfried: all my XSD files are stored locally. In fact, when I call
the "load()" method (setSchemaValidation is true), the XML is loaded
correctly. By the way, I introduced on purpose some errors in the XML
file and it was not correctly loaded, meaning that the validation is
really active and working (so, XSD files are correctly found).

@Oliver: thanks for the hint, but I think there is a strange behavior
in my opinion.

Iterator it = xmlPersonConfiguration.getKeys();
while (it.hasNext()) {
LOGGER.info(it.next());
}
final String string = namespace + Tags.PERSON; // namespace is a
parameter equals to "p:"
xmlPerson = xmlPersonConfiguration.configurationsAt(string);
LOGGER.info("--> Found " + xmlPerson.size() + " persons (key: " +
string + ")");

This lead to have:
2015-11-25 09:08:10,320 [c.v.t.b.r.ConfigReader:402  ] INFO  -
parsePerson : p:person/p:title
2015-11-25 09:08:10,324 [c.v.t.b.r.ConfigReader:402  ] INFO  -
parsePerson : p:person/p:firstName
2015-11-25 09:08:10,326 [c.v.t.b.r.ConfigReader:402  ] INFO  -
parsePerson : p:person/p:lastName
...all the tags here are correctly logged...
2015-11-25 09:08:10,346 [c.v.t.b.r.ConfigReader:402  ] INFO  -
parsePerson : @xmlns:ath
2015-11-25 09:08:10,346 [c.v.t.b.r.ConfigReader:402  ] INFO  -
parsePerson : @xmlns:com
2015-11-25 09:08:10,346 [c.v.t.b.r.ConfigReader:402  ] INFO  -
parsePerson : @xmlns:p
2015-11-25 09:08:10,347 [c.v.t.b.r.ConfigReader:402  ] INFO  -
parsePerson : @xmlns:xsi
2015-11-25 09:08:10,347 [c.v.t.b.r.ConfigReader:402  ] INFO  -
parsePerson : @xsi:schemaLocation
2015-11-25 09:08:10,720 [c.v.t.b.r.ConfigReader:406  ] INFO  -
parsePerson :  --> Found 0 persons (key: p:person)

Question: since my xml file has this structure (I omit the namespace
declaration for ease of reading):

  
...
...
  
  
...
...
  


Why "p:person" is not in the keys, but only the sub-tags of p:person?
When I had my xml with the XSD, but without namespaces, looking for
"person" worked fine, so I was able to iterate on the 2 persons
available in the XML example above.

By the way, I also tried to look for "p:person/p:title", that is a key
found by calling the "getKeys()" method:
xmlPerson = xmlPersonConfiguration.configurationsAt("p:person/p:title");
LOGGER.info("--> Found " + xmlPerson.size() + " persons");

but the xmlPerson.size is always equal to 0.
FYI xmlPersonConfiguration is created and initialized as:

XMLConfiguration xmlPersonConfiguration = new XMLConfiguration();
xmlPersonConfiguration.setExpressionEngine(new
XPathExpressionEngine());
xmlPersonConfiguration.setSchemaValidation(true);
xmlPersonConfiguration.setFileName("...");
xmlPersonConfiguration.load();

If I don't call the "setExpressionEngine" method and I search for tags
like "p:person.p:title" or "p:person", all these entries are correctly
found and I can iterate over them.

Any other suggestions?


thanks in advance for the feedback.

2015-11-24 21:26 GMT+01:00 Oliver Heger :
> Hi Maurizio,
>
> in order to debug your problem, you can call the configuration's
> getKeys() method. From the iterator returned you should see the
> available keys. These keys can then also be used for querying properties.
>
> HTH
> Oliver
>
> Am 24.11.2015 um 13:54 schrieb Maurizio Lattuada:
>> Hi guys,
>>
>> I'm dealing with a strange problem while parsing an XML file (with
>> namespaces) using commons configuration 1.10.
>> First of all, let me say that when I call the "load()" method on the
>> following XML file (validation is active), it is loaded flawless.
>>
>> This is an extract of the xml to be parsed:
>> 
>> 
>> > action="create"
>> xmlns:ath="tdm:configuration:authentication"
>> xmlns:com="tdm:configuration:common"
>> xmlns:p="tdm:configuration:entities"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>> xsi:schemaLocation="tdm:configuration:entities ../xsd/model/persons.xsd 
>> ">
>> 
>> Dr.
>> ...
>> 
>> 
>> Mr.
>> ...
>> 
>> 
>>
>> This is an extract of the persons.xsd, as you can see there are a
>> couple of imports
>> 
>> > xmlns:common="tdm:configuration:common"
>> xmlns:authentication="tdm:configuration:authentication"
>> targetNamespace="tdm:configuration:entities"
>> xmlns:xs="http://www.w3.org/2001/XMLSchema; 
>> elementFormDefault="qualified">
>> > namespace="tdm:configuration:common" />
>> > namespace="tdm:configuration:authentication" />
>> 
>> 
>>
>>
>> And finally an extract of the code to setup the parse and to read the 
>> document:
>> XMLConfiguration xmlPersonConfiguration = new XMLConfiguration();
>> xmlPersonConfiguration.setDelimiterParsingDisabled(true); // needed
>> because I've attribute with multiple values like "a,b,c"
>> xmlPersonConfiguration.setExpressionEngine(new XPathExpressionEngine());
>>