You are viewing a plain text version of this content. The canonical link for it is here.
Posted to phoenix-dev@avalon.apache.org by Peter Royal <pr...@apache.org> on 2002/06/28 07:31:39 UTC

Configuration Validation

I just put hooks into Phoenix for configuration validation. I want to make 
sure I've hooked into the right places before implementing. (If there are no 
complaints by tommorow eve it should happen then).

Currently I'm looking at using RELAX-NG as the schema language, as it seems 
much easier to understand in 15m than XML Schema.

I also commited the start of the persistent config. repository. Doesn't do 
much yet, but it will come into play once validation gets going. Wait and see 
(or read the archives)
-pete

-- 
peter royal -> proyal@apache.org

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Configuration Validation

Posted by Peter Royal <pr...@apache.org>.
On Sunday 30 June 2002 09:37 pm, Peter Donald wrote:
> works for me. Or Maybe even "Blockame-schema.[xsd|rng|...]" just to avoid
> collisions with other stuff Stephen is working on - then again it may not
> be that important, not sure.

I'll do that. The question is the extension. I'm wavering between having a 
hardcoded list of schema-types to extension vs having the extension included 
in the blockinfo.

> Alternatively you could import the schema via xdoclet. ie Have schema sit
> side-by-side block java file and during XDoclet process it gets merged into
> BlockInfo descriptor. Then again thats a bit ugly and painful todoso maybe
> separate file is best.

I've been sitting here pondering that, and I think thats a bad idea. The 
individual schema validators will need the schema as an XML input, and the 
conversion from embedded in the blockinfo (xml) -> configuration object -> 
xml seems like it could be superfluous and potentially error prone. (or at 
least confusing, if you have an invalid schema error messages from the 
validator could be difficult to interpret).
-pete


-- 
peter royal -> proyal@apache.org

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Configuration Validation

Posted by Peter Donald <pe...@apache.org>.
On Mon, 1 Jul 2002 11:19, Peter Royal wrote:
> I'm currently writing some schemas so I have something to test, and I
> thought of something: We can't be sure of what the root element will be!
>
> Thus, I am thinking of re-writing Configuration's before validating, to
> have a well-known root element (otherwise it will be the configured block
> name, which is out of the control of the block author).

sounds good to me.

> The other issue I am running into is that it is a PAIN to write XML inside
> of a javadoc. Thus I am thinking of using a src attribute to specify where
> in to load the schema from (classloader resources only, probably
> BlockName.<schema ext>, so BlockName.xsd, BLockName.rng,
> BlockName.schematron, etc). -pete

works for me. Or Maybe even "Blockame-schema.[xsd|rng|...]" just to avoid 
collisions with other stuff Stephen is working on - then again it may not be 
that important, not sure.

Alternatively you could import the schema via xdoclet. ie Have schema sit 
side-by-side block java file and during XDoclet process it gets merged into 
BlockInfo descriptor. Then again thats a bit ugly and painful todoso maybe 
separate file is best.

-- 
Cheers,

Peter Donald
*------------------------------------------------*
| You can't wake a person who is pretending      |
|       to be asleep. -Navajo Proverb.           |
*------------------------------------------------* 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Configuration Validation

Posted by Peter Royal <pr...@apache.org>.
On Friday 28 June 2002 01:31 am, Peter Royal wrote:
> I just put hooks into Phoenix for configuration validation. I want to make
> sure I've hooked into the right places before implementing. (If there are
> no complaints by tommorow eve it should happen then).

Okay so I'm a bit slow :)

I'm currently writing some schemas so I have something to test, and I thought 
of something: We can't be sure of what the root element will be!

Thus, I am thinking of re-writing Configuration's before validating, to have a 
well-known root element (otherwise it will be the configured block name, 
which is out of the control of the block author).

The other issue I am running into is that it is a PAIN to write XML inside of 
a javadoc. Thus I am thinking of using a src attribute to specify where in to 
load the schema from (classloader resources only, probably BlockName.<schema 
ext>, so BlockName.xsd, BLockName.rng, BlockName.schematron, etc).
-pete

-- 
peter royal -> proyal@apache.org

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Configuration Validation

Posted by Peter Royal <pr...@apache.org>.
On Saturday 29 June 2002 12:24 am, Mircea Toma wrote:
> > Currently I'm looking at using RELAX-NG as the schema language, as it
> > seems much easier to understand in 15m than XML Schema.
>
> I will check-in this weekend an initial implementation of a schema
> validator built on Schematron.
> http://www.zvon.org/ZvonSW/ZvonSchematron/Reference/Output/index.html

Excellent. Be warned that the interfaces might change a bit. I'm thinking of 
having a single ConfigurationValidator that is capable of having multiple 
child-components that know how to handle different schemas. That way if you 
are aggregating blocks from different sources with different schema types, 
you won't get bitten.

> I got the idea from Ivelin Ivanov (Cocoon commiter). I doesn't support
> phases for now but it's just a matter of time to do that.

I took a brief look at Schematron, looks neat. Its based mostly on xpath 
though, right?

One reason I was going in the RELAX-NG direction, is that I don't think it 
will be tooo difficult to automatically build a GUI from a good schema def.
-pete

-- 
peter royal -> proyal@apache.org

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Configuration Validation

Posted by Mircea Toma <mi...@bigfoot.com>.
On June 27, 2002 11:31 pm, Peter Royal wrote:
...
> Currently I'm looking at using RELAX-NG as the schema language, as it seems
> much easier to understand in 15m than XML Schema.

I will check-in this weekend an initial implementation of a schema validator 
built on Schematron.
http://www.zvon.org/ZvonSW/ZvonSchematron/Reference/Output/index.html 

I got the idea from Ivelin Ivanov (Cocoon commiter). I doesn't support phases 
for now but it's just a matter of time to do that.

Mircea

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Docs]

Posted by Peter Donald <pe...@apache.org>.
At 11:24 PM 7/10/2002 -0700, you wrote:
>Folks,
>Right now
>Phoenix uses deprecated DefaultLogKitManager .
>Shouldn't we be migrating to
>o.a.a.e.LogKitLoggerManager.?

Probably ;)

>describes the Logger 1.1 wrongly.
>======Correct environment.xml===========

Applied - thanks. The site will be corrected next time we generate it.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


[Docs]

Posted by Vinay Chandran <vi...@yahoo.com>.
Folks,
Right now 
Phoenix uses deprecated DefaultLogKitManager .
Shouldn't we be migrating to
o.a.a.e.LogKitLoggerManager.?

URL :
http://jakarta.apache.org/avalon/phoenix/assemblers/environment-xml-specification.html

describes the Logger 1.1 wrongly.
======Correct environment.xml===========
<?xml version="1.0"?>
<environment>
	<logs version="1.1">
	<factories>
	  <factory type="file"
	          
class="org.apache.avalon.excalibur.logger.factory.FileTargetFactory"/>
	</factories>
	
	<categories>
	  <category name="" log-level="INFO">
	    <log-target id-ref="default"/>
	  </category>
	</categories>
	
	<targets>
	  <file id="default">
	    <filename>${app.home}/logs/default-</filename>
	    <append>true</append>
	    <rotation type="unique" pattern="yyyyMMdd"
suffix=".log">
	      <date>yyyyMMdd</date>
	    </rotation>
	  </file>
	</targets>
</logs>
</environment>


Regards,
Vinay


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>