RE: [Mav-user] Defining a common view in the sitemap

2003-03-20 Thread Schnitzer, Jeff
Are you familiar with XSLT?

Maverick allows you to define an XSLT template that will be used to
transform the config file prior to loading it.  This means, effectively,
that the config file format can be anything you want.  Look in the
documentation for the configTransform init-param to the Dispatcher
servlet.

It would be fairly trivial to use this mechanism so that snippets like
this:

command name=blah protected=true
  ...
/command

Automatically get converted into:

command name=blah
  view name=DENIED path=.../
  ...
/command

It's been a little while for me but I think the template would look
something like this:

xsl:template match=[EMAIL PROTECTED]'true']
  command
xsl:copy-of select=@*|*/
view name=DENIED path=yourpath.jsp/
  /command
/xsl:template

Someone might want to correct me (or provide a better template - there
are several ways of accomplishing this in XSLT).

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Jozsa Kristof [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 20, 2003 5:13 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Defining a common view in the sitemap
 
 Hi there,
 
 I'm not sure whether this question got asked already.. please bear
with me
 if it had. Is it possible to define a custom view for *every* maverick
 command (or for a couple of ones) with the same output? Eg. I
implemented
 my
 own ProtectedController, which has a default output called 'DENIED',
and I
 guess it'd be *much* easier to define this view for all my commands
than
 adding it one by one. It'd also shorten maverick.xml quite much..
 
 Can you guys show me some easy way to get through this problem?
 
 tia,
 dyn
 
 --
 .Digital.Yearning.for.Networked.Assassination.and.Xenocide
 
 
 ---
 This SF.net email is sponsored by: Tablet PC.
 Does your code think in ink? You could win a Tablet PC.
 Get a free Tablet PC hat just for playing. What are you waiting for?
 http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
 [INVALID FOOTER]



---
This SF.net email is sponsored by: Tablet PC.
Does your code think in ink? You could win a Tablet PC.
Get a free Tablet PC hat just for playing. What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
[INVALID FOOTER]


RE: [Mav-user] Defining a common view in the sitemap

2003-03-20 Thread Brian Dame
Could this same aproach be used to define something like a path
variable? What I'd like is something similar to Ant property elements.

For example, most of my tranform elements all have the same path. It
would be a lot easier to define that path once and then reference that
variable name:

property name=transform-path value=/path/to/page.jsp/

tranform path=${tranform-path}/

It sounds like I should be able to do the same thing with XSLT.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Schnitzer,
Jeff
Sent: Thursday, March 20, 2003 3:17 PM
To: [EMAIL PROTECTED]
Subject: RE: [Mav-user] Defining a common view in the sitemap


Are you familiar with XSLT?

Maverick allows you to define an XSLT template that will be used to
transform the config file prior to loading it.  This means, effectively,
that the config file format can be anything you want.  Look in the
documentation for the configTransform init-param to the Dispatcher
servlet.

It would be fairly trivial to use this mechanism so that snippets like
this:

command name=blah protected=true
  ...
/command

Automatically get converted into:

command name=blah
  view name=DENIED path=.../
  ...
/command

It's been a little while for me but I think the template would look
something like this:

xsl:template match=[EMAIL PROTECTED]'true']
  command
xsl:copy-of select=@*|*/
view name=DENIED path=yourpath.jsp/
  /command
/xsl:template

Someone might want to correct me (or provide a better template - there
are several ways of accomplishing this in XSLT).

Jeff Schnitzer
[EMAIL PROTECTED]

 -Original Message-
 From: Jozsa Kristof [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 20, 2003 5:13 AM
 To: [EMAIL PROTECTED]
 Subject: [Mav-user] Defining a common view in the sitemap
 
 Hi there,
 
 I'm not sure whether this question got asked already.. please bear
with me
 if it had. Is it possible to define a custom view for *every* maverick

 command (or for a couple of ones) with the same output? Eg. I
implemented
 my
 own ProtectedController, which has a default output called 'DENIED',
and I
 guess it'd be *much* easier to define this view for all my commands
than
 adding it one by one. It'd also shorten maverick.xml quite much..
 
 Can you guys show me some easy way to get through this problem?
 
 tia,
 dyn
 
 --
 .Digital.Yearning.for.Networked.Assassination.and.Xenocide
 
 
 ---
 This SF.net email is sponsored by: Tablet PC.
 Does your code think in ink? You could win a Tablet PC.
 Get a free Tablet PC hat just for playing. What are you waiting for? 
 http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
 [INVALID FOOTER]



---
This SF.net email is sponsored by: Tablet PC.  
Does your code think in ink? You could win a Tablet PC. 
Get a free Tablet PC hat just for playing. What are you waiting for? 
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
[INVALID FOOTER]





---
This SF.net email is sponsored by: Tablet PC.  
Does your code think in ink? You could win a Tablet PC. 
Get a free Tablet PC hat just for playing. What are you waiting for? 
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
[INVALID FOOTER]


Re: [Mav-user] Defining a common view in the sitemap

2003-03-20 Thread toby cabot
On Thu, Mar 20, 2003 at 03:47:43PM -0500, Brian Dame wrote:
 Could this same aproach be used to define something like a path
 variable? What I'd like is something similar to Ant property elements.
 
 For example, most of my tranform elements all have the same path. It
 would be a lot easier to define that path once and then reference that
 variable name:
 
 property name=transform-path value=/path/to/page.jsp/
 
 tranform path=${tranform-path}/

Would XML entities work?

http://www.w3.org/TR/REC-xml#sec-entity-decl



---
This SF.net email is sponsored by: Tablet PC.  
Does your code think in ink? You could win a Tablet PC. 
Get a free Tablet PC hat just for playing. What are you waiting for? 
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
[INVALID FOOTER]