newbie question with wildcard in sitemap

2003-07-01 Thread Sliman Bouchareb
hi cocooners,

i have the following directory structrue:

cocoon:|
 |protected-
|-docs -
  |-home
  |-fr
  |.
|-stylsheets
|-descriptors
|-css

and the followinf sitemap:

map:match pattern=do-login
!-- first validate whether submitted values are ok --
map:act type=form-validator
  map:parameter name=descriptor
value=context://protected/descriptors/params.xml/
  map:parameter name=validate value=username/
  !-- now try to log in --
  map:act type=db-authenticator
map:parameter name=descriptor
value=context://protected/descriptors/auth.xml/
!-- now go to protected area --
map:redirect-to uri=home/home.section/
  /map:act
/map:act
!-- something was wrong, try it again --
map:redirect-to uri=error/
  /map:match


* after a successfull login i call the uri  home/home.section

and then i have the following match:


map:match pattern=*/*.*
!-- first validate whether user has logged in --
map:act type=session-validator
  map:parameter name=descriptor
value=context://protected//descriptors/params.xml/
  map:parameter name=validate
value=username,department_id,theme/
  !-- generate protected content --
  !-- map:generate type=serverpages
src=docs/protected.xsp/ --
  !-- map:transform src=stylesheets/{theme}-page2html.xsl/ --


map:generate src=docs/home/home.xml/
map:transform src=stylesheets/page.xsl
  map:parameter name=section value=home/
  map:parameter name=toc-file value=../docs/toc.xml/
  map:parameter name=base-url value=/cocoon/protected/
/map:transform

map:transform src=stylesheets/menupage.xsl
  map:parameter name=section value=home/
  map:parameter name=request-url value=home.section/
  map:parameter name=toc-file value=../docs/toc.xml/
  map:parameter name=css-stylesheet value=default.css/
  map:parameter name=base-url value=/cocoon/protected/
/map:transform
map:serialize/
/map:act
!-- something was wrong, redirect to login page --
map:redirect-to uri=login/
  /map:match

* well this works fine, nut i want to substitute map:generate
src=docs/home/home.xml / with map:generate src=docs/{1}/home.xml /
because i have many ressources, but this dont work :-(, why that ?


thanx



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



Re: newbie question with wildcard in sitemap

2003-07-01 Thread Joerg Heinicke
You have a map:act/ surrounding not only this map:generate/. This 
map:act/ makes it necessary to use {../1}:

map:generate src=docs/{../1}/home.xml /

Regards,

Joerg

Sliman Bouchareb wrote:
hi cocooners,

i have the following directory structrue:

cocoon:|
 |protected-
|-docs -
  |-home
  |-fr
  |.
|-stylsheets
|-descriptors
|-css
and the followinf sitemap:

map:match pattern=do-login
!-- first validate whether submitted values are ok --
map:act type=form-validator
  map:parameter name=descriptor
value=context://protected/descriptors/params.xml/
  map:parameter name=validate value=username/
  !-- now try to log in --
  map:act type=db-authenticator
map:parameter name=descriptor
value=context://protected/descriptors/auth.xml/
!-- now go to protected area --
map:redirect-to uri=home/home.section/
  /map:act
/map:act
!-- something was wrong, try it again --
map:redirect-to uri=error/
  /map:match
* after a successfull login i call the uri 	home/home.section

and then i have the following match:

map:match pattern=*/*.*
!-- first validate whether user has logged in --
map:act type=session-validator
  map:parameter name=descriptor
value=context://protected//descriptors/params.xml/
  map:parameter name=validate
value=username,department_id,theme/
  !-- generate protected content --
  !-- map:generate type=serverpages
src=docs/protected.xsp/ --
  !-- map:transform src=stylesheets/{theme}-page2html.xsl/ --
map:generate src=docs/home/home.xml/
map:transform src=stylesheets/page.xsl
  map:parameter name=section value=home/
  map:parameter name=toc-file value=../docs/toc.xml/
  map:parameter name=base-url value=/cocoon/protected/
/map:transform
map:transform src=stylesheets/menupage.xsl
  map:parameter name=section value=home/
  map:parameter name=request-url value=home.section/
  map:parameter name=toc-file value=../docs/toc.xml/
  map:parameter name=css-stylesheet value=default.css/
  map:parameter name=base-url value=/cocoon/protected/
/map:transform
map:serialize/
/map:act
!-- something was wrong, redirect to login page --
map:redirect-to uri=login/
  /map:match
* well this works fine, nut i want to substitute map:generate
src=docs/home/home.xml / with map:generate src=docs/{1}/home.xml /
because i have many ressources, but this dont work :-(, why that ?
thanx
--

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


question: adapting matchers to environment

2003-07-01 Thread FREDERICK E WAYNE
hullo all,

we're running a cocoon site in multiple places. each of the developers has their own 
local tomcat/cocoon install, plus we have the production server.

trouble is, the production server has a slightly different environment. URIs have to 
be a little different:

development: http://localhost:8080/ems/emslinks/foo
production: http://server/cocoon/ems/emslinks/foo

the sitemap has to reflect this, so:

development:
map:match pattern=emslinks/*
 map:generate type=html src=emslinks/{1}.html/
 map:serialize/
/map:match

production:
map:match pattern=ems/emslinks/*
 map:generate type=html src=emslinks/{1}.html/
 map:serialize/
/map:match
   
so i have to maintain two sitemap files, which is incredibly error-prone. my question 
is this: is there some way i can parameterize the matching from, say, an environment 
variable? say:
map:match pattern={$fnord}/emslinks/*

or am i completely barking up the wrong tree, and should apply my efforts to making 
the URIs the same for the development machines?

thanks for the help,

rw


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



Re: xsp question

2003-06-26 Thread Roger I Martin PhD
I use Netbeans to check the xml.  It can also be used for performing xslt
per file rather than building the cocoon war and redeploying it on tomcat.
For some xml I've also got it to validate the xml to the dtd and xsd's.  For
xsp I've only verified checking it for wellformness.

I also recommend that you reorganise your project so that it isn't sub to
the Cocoon examples; just use what is needed, the cocoon-*.jar's and lib
dependencies for starters.  It is also possible to work on your webapp in
it's deployed directories and then eventually bring it back to a project
directory and develop a build.xml for ant at that point.  When working in
it's deployed state, out of nervousness I make sure there is no associated
war file in tomcat/webapps and constantly delete the associated tomcat work
files in the tomcat/work/Catalina/localhost/mywebapp.  When testing xsp's I
leave the work files and put a mount in Netbeans at the package root of the
generated *_xsp.java files.

A code writing cycle which includes Cocoon build and deployment can be
debilitating to say the least. Can be a real stumbling block for developers
working with Cocoon for the first time. It is completely unnecessary but it
is the way the all-to-familiar Cocoon developer's have structured their
project.  Otherwise Cocoon is a powerful servlet.

-Roger

- Original Message -
From: Tim Bachta [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 6:11 PM
Subject: RE: xsp question


I tried using more tags like you suggested and I get an error:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.





End tag 'content' does not match the start tag 'tasks'. Error processing
resource
'http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1'.
Line 167, Position 3

/content
--^


Thanks

Tim Bachta



-Original Message-
From: Roger I Martin PhD [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 4:51 PM
To: [EMAIL PROTECTED]
Subject: Re: xsp question

You need to put more starts and stops(only where your doing Java) to the
xsp:logic...see below. at the bottom I pasted some xsp with logic that I
know is working.
- Original Message -
From: Tim Bachta [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 4:33 PM
Subject: xsp question


I am trying to use logic in an xsp page to get the output formatted
correctly, here is what I want the output to look like



taskanddate

  date2003-05-20/date

  tasks

deviation0/deviation

completed-bySomebodys, Name/completed-by

deviation0/deviation

completed-bySomebodys, Name2/completed-by

deviation0/deviation

completed-bySomebodys, Name3/completed-by

  /tasks

/taskanddate





here is the code that I am using



xsp:logic

   String date = esql:get-string column=3/;

   if(!date.equalsIgnoreCase(oldDate))

   { oldDate = date;
/xsp:logic

 taskanddate

date

   esql:get-string column=3/

/date

tasks


xsp:logic

   }
/xsp:logic

   compleated-by

 esql:get-string column=4/

   /compleated-by


xsp:logic

   if(!date.equalsIgnoreCase(oldDate))

   {
/xsp:logic

/tasks

 /taskanddate

xsp:logic
   }

/xsp:logic



and here is the result that I am getting:




http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- taskanddate

  date2003-05-22 00:00:00.0/date


http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- tasks

  }

  compleated-by /

  if(!date.equalsIgnoreCase(oldDate)) {

  /tasks

  /taskanddate


http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- taskanddate

  date2003-05-23 00:00:00.0/date


http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- tasks

  }

  compleated-by /

  if(!date.equalsIgnoreCase(oldDate)) {

  /tasks

  /taskanddate


http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- taskanddate

  date2003-05-24 00:00:00.0/date


http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- tasks

  }

  compleated-by /

  if(!date.equalsIgnoreCase(oldDate)) {

  /tasks

  /taskanddate





If anyone knows of a way to do this correctly I would greatly appreciate
the help.



Thank you



Tim Bachta


xsp:logic
  if(!selectMap amp;amp; parameterNames!=null amp;amp;
parameterNames.lengthgt;0)
  {
   //System.out.println(here);
   str=mapIDValues[0];
   boolean check=false;
   int index=str.length()-1;
   while(!check amp;amp; indexgt;=0)
   {
if(!Character.isDigit(str.charAt(index

xsl question

2003-06-26 Thread Tim Bachta
How would I do an if statement in xsl were I am testing for the value of
an element?  Example

 

xsl:if test=deviation = 1

.

 

 

where my incoming xml looks like this:

 

de  deviation0/deviation 

   compleated-byN/A/compleated-by 

 

Thanks for the help

 

Tim Bachta

 

 


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



RE: xsl question

2003-06-26 Thread Yan, Charlene
You should ask [EMAIL PROTECTED]  They are really good on xsl questions.

xsl:if test=deviation ='1'

Charlene
-Original Message-
From: Joydeep Bose [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 12:49 PM
To: [EMAIL PROTECTED]; Tim Bachta
Subject: Re: xsl question


To be on the safer side put the fully qualified element:
eg test=/page/deviation = 1

unless the if statement is in a for-each or something that selects the parent 
node of the deviation element.Then just deviation is fine.


Quoting Tim Bachta [EMAIL PROTECTED]:

 How would I do an if statement in xsl were I am testing for the value of
 an element?  Example
 
  
 
 xsl:if test=deviation = 1
 
 .
 
  
 
  
 
 where my incoming xml looks like this:
 
  
 
 de  deviation0/deviation 
 
compleated-byN/A/compleated-by 
 
  
 
 Thanks for the help
 
  
 
 Tim Bachta
 
  
 
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



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


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



xsp question

2003-06-25 Thread Tim Bachta
I am trying to use logic in an xsp page to get the output formatted
correctly, here is what I want the output to look like

 

taskanddate

  date2003-05-20/date

  tasks

deviation0/deviation

completed-bySomebodys, Name/completed-by

deviation0/deviation

completed-bySomebodys, Name2/completed-by

deviation0/deviation

completed-bySomebodys, Name3/completed-by

  /tasks

/taskanddate

 

 

here is the code that I am using

 

xsp:logic

   String date = esql:get-string column=3/;

   if(!date.equalsIgnoreCase(oldDate))

   { oldDate = date;

 taskanddate

date

   esql:get-string column=3/

/date

tasks



   }

   compleated-by

 esql:get-string column=4/

   /compleated-by

   

   if(!date.equalsIgnoreCase(oldDate))

   {

/tasks

 /taskanddate

   } 

/xsp:logic 

 

and here is the result that I am getting:

 

 
http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- taskanddate

  date2003-05-22 00:00:00.0/date 

 
http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- tasks

  } 

  compleated-by / 

  if(!date.equalsIgnoreCase(oldDate)) { 

  /tasks

  /taskanddate

 
http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- taskanddate

  date2003-05-23 00:00:00.0/date 

 
http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- tasks

  } 

  compleated-by / 

  if(!date.equalsIgnoreCase(oldDate)) { 

  /tasks

  /taskanddate

 
http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- taskanddate

  date2003-05-24 00:00:00.0/date 

 
http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- tasks

  } 

  compleated-by / 

  if(!date.equalsIgnoreCase(oldDate)) { 

  /tasks

  /taskanddate

 

 

If anyone knows of a way to do this correctly I would greatly appreciate
the help.

 

Thank you

 

Tim Bachta

 

 


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



RE: xsp question

2003-06-25 Thread Tim Bachta
I tried using more tags like you suggested and I get an error:

The XML page cannot be displayed 
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later. 





End tag 'content' does not match the start tag 'tasks'. Error processing
resource
'http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1'.
Line 167, Position 3 

/content
--^


Thanks

Tim Bachta
 
 

-Original Message-
From: Roger I Martin PhD [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2003 4:51 PM
To: [EMAIL PROTECTED]
Subject: Re: xsp question

You need to put more starts and stops(only where your doing Java) to the
xsp:logic...see below. at the bottom I pasted some xsp with logic that I
know is working.
- Original Message -
From: Tim Bachta [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 4:33 PM
Subject: xsp question


I am trying to use logic in an xsp page to get the output formatted
correctly, here is what I want the output to look like



taskanddate

  date2003-05-20/date

  tasks

deviation0/deviation

completed-bySomebodys, Name/completed-by

deviation0/deviation

completed-bySomebodys, Name2/completed-by

deviation0/deviation

completed-bySomebodys, Name3/completed-by

  /tasks

/taskanddate





here is the code that I am using



xsp:logic

   String date = esql:get-string column=3/;

   if(!date.equalsIgnoreCase(oldDate))

   { oldDate = date;
/xsp:logic

 taskanddate

date

   esql:get-string column=3/

/date

tasks


xsp:logic

   }
/xsp:logic

   compleated-by

 esql:get-string column=4/

   /compleated-by


xsp:logic

   if(!date.equalsIgnoreCase(oldDate))

   {
/xsp:logic

/tasks

 /taskanddate

xsp:logic
   }

/xsp:logic



and here is the result that I am getting:




http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- taskanddate

  date2003-05-22 00:00:00.0/date


http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- tasks

  }

  compleated-by /

  if(!date.equalsIgnoreCase(oldDate)) {

  /tasks

  /taskanddate


http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- taskanddate

  date2003-05-23 00:00:00.0/date


http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- tasks

  }

  compleated-by /

  if(!date.equalsIgnoreCase(oldDate)) {

  /tasks

  /taskanddate


http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- taskanddate

  date2003-05-24 00:00:00.0/date


http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##
- tasks

  }

  compleated-by /

  if(!date.equalsIgnoreCase(oldDate)) {

  /tasks

  /taskanddate





If anyone knows of a way to do this correctly I would greatly appreciate
the help.



Thank you



Tim Bachta


xsp:logic
  if(!selectMap amp;amp; parameterNames!=null amp;amp;
parameterNames.lengthgt;0)
  {
   //System.out.println(here);
   str=mapIDValues[0];
   boolean check=false;
   int index=str.length()-1;
   while(!check amp;amp; indexgt;=0)
   {
if(!Character.isDigit(str.charAt(index)))
{
  check=true;
  index++;
}
else if(index==0)
{
 check=true;
}
else
{
 index--;
}
   }
   if(check)
   {
  mapIDPrefix=str.substring(0,index);

mapIDIndex=Integer.parseInt(str.substring(index,str.length()));
   }
/xsp:logic
table border=1
 CAPTIONMap Locations/CAPTION
 trthLocation
#/ththX/ththY/ththMAP_ID/th/tr
xsp:logic
int count=1;
for(index=0;indexlt;xValues.length;index++)
  {

   if(removeRowSet.elementAt(index)==null)
   {
str=xValues[index];
/xsp:logic
   trtdxsp:exprcount/xsp:expr/td
   tdinput type=text
xsp:attribute name=nameX/xsp:attribute
xsp:attribute
name=valuexsp:exprstr/xsp:expr/xsp:attribute
  /input/td
  xsp:logic
str=yValues[index];
  /xsp:logic
   tdinput type=text
xsp:attribute name=nameY/xsp:attribute
xsp:attribute
name=valuexsp:exprstr/xsp:expr/xsp:attribute
  /input/td
  xsp:logic
str=mapIDPrefix+mapIDIndex;
  /xsp:logic
   tdinput type=text
xsp:attribute name=nameMAP_ID/xsp:attribute
xsp:attribute
name=valuexsp:exprstr/xsp:expr

Perplexing PDF SVG question

2003-06-23 Thread Irving Salisbury III
I have embedded an SVG image into my xsl:fo document.  It renders fine 
when using command line fop.  However, when I put it in a cocoon 
pipeline, I am getting the following error:

ERROR   (2003-06-23) 08:02.42:903   [sitemap.serializer.fo2pdf.fop] 
(/medicaid/sequence/first/pdf) Thread-10/PDFRenderer: svg graphic could 
not be built: null
java.lang.NullPointerException
   at java.net.URL.init(URL.java:366)
   at java.net.URL.init(URL.java:329)
   at java.net.URL.init(URL.java:321)
   at java.net.URL.init(URL.java:252)
   at java.net.URL.init(URL.java:275)
   at org.apache.batik.util.ParsedURLData.buildURL(Unknown Source)
   at org.apache.batik.util.ParsedURLData.openStreamInternal(Unknown 
Source)
   at org.apache.batik.util.ParsedURLData.openStream(Unknown Source)
   at org.apache.batik.util.ParsedURL.openStream(Unknown Source)
   at 
org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown 
Source)
   at org.apache.batik.bridge.DocumentLoader.loadDocument(Unknown Source)
   at org.apache.batik.bridge.URIResolver.getNode(Unknown Source)
   at org.apache.batik.bridge.URIResolver.getElement(Unknown Source)
   at 
org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown Source)
   at org.apache.batik.bridge.CSSUtilities.convertClipPath(Unknown Source)
   at 
org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNode(Unknown 
Source)
   at 
org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown 
Source)
   at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
   at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
   at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
   at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
   at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
   at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
   at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
   at org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(Unknown 
Source)
   at org.apache.fop.render.pdf.PDFRenderer.renderSVGArea(Unknown Source)
   at org.apache.fop.svg.SVGArea.render(Unknown Source)
   at 
org.apache.fop.render.pdf.PDFRenderer.renderForeignObjectArea(Unknown 
Source)
   at org.apache.fop.layout.inline.ForeignObjectArea.render(Unknown Source)
   at org.apache.fop.render.AbstractRenderer.renderLineArea(Unknown Source)
   at org.apache.fop.layout.LineArea.render(Unknown Source)
   at org.apache.fop.render.AbstractRenderer.renderBlockArea(Unknown 
Source)
   at org.apache.fop.layout.BlockArea.render(Unknown Source)
   at 
org.apache.fop.render.AbstractRenderer.renderAreaContainer(Unknown Source)
   at org.apache.fop.layout.ColumnArea.render(Unknown Source)
   at org.apache.fop.render.AbstractRenderer.renderSpanArea(Unknown Source)
   at org.apache.fop.layout.SpanArea.render(Unknown Source)
   at 
org.apache.fop.render.AbstractRenderer.renderBodyAreaContainer(Unknown 
Source)
   at org.apache.fop.render.pdf.PDFRenderer.renderPage(Unknown Source)
   at org.apache.fop.render.pdf.PDFRenderer.render(Unknown Source)
   at org.apache.fop.apps.StreamRenderer.queuePage(Unknown Source)
   at org.apache.fop.layout.AreaTree.addPage(Unknown Source)
   at org.apache.fop.fo.pagination.PageSequence.format(Unknown Source)
   at org.apache.fop.apps.StreamRenderer.render(Unknown Source)
   at org.apache.fop.fo.FOTreeBuilder.endElement(Unknown Source)
   at 
org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:147)
   at 
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:307)
   at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:684)
   at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2182)
   at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:678)
   at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2182)
   at 
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2008)
   at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1171)
   at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3135)
   at java.lang.Thread.run(Thread.java:536)

Here is the start of the SVG element:

fo:block
   fo:instream-foreign-object height=480px width=640px
   svg fill-opacity=1 color-rendering=auto 
color-interpolation=auto stroke=black text-rendering=auto 
stroke-linecap=square width=640 stroke-miterlimit=10 
shape-rendering=auto stroke-opacity=1 fill=black 
stroke-dasharray=none font-weight=normal stroke-width=1 
height=480 font-family='sansserif' font-style=normal 
stroke-linejoin=miter font-size=12 stroke-dashoffset=0 
image-rendering=auto
defs id=genericDefs/
   g
   defs id=defs1
   clipPath clipPathUnits=userSpaceOnUse id=clipPath1
path d=M0 0 L640 0 L640 480 L0 480 L0 0 Z/
/clipPath
   clipPath 

RE: Perplexing PDF SVG question

2003-06-23 Thread Schaper, Christoph
Just guessing: You are on Unix and you don't have the display variable set
when you run  cocoon? 
If this is the case, either point the display variable to your X environment
or, if you don't have one search in the cocoon docu for headless.


Christoph

-Original Message-
From: Irving Salisbury III [mailto:[EMAIL PROTECTED]
Sent: 23 June 2003 15:27
To: [EMAIL PROTECTED]
Subject: Perplexing PDF SVG question


I have embedded an SVG image into my xsl:fo document.  It renders fine 
when using command line fop.  However, when I put it in a cocoon 
pipeline, I am getting the following error:

ERROR   (2003-06-23) 08:02.42:903   [sitemap.serializer.fo2pdf.fop] 
(/medicaid/sequence/first/pdf) Thread-10/PDFRenderer: svg graphic could 
not be built: null
java.lang.NullPointerException
at java.net.URL.init(URL.java:366)
at java.net.URL.init(URL.java:329)
at java.net.URL.init(URL.java:321)
at java.net.URL.init(URL.java:252)
at java.net.URL.init(URL.java:275)
at org.apache.batik.util.ParsedURLData.buildURL(Unknown Source)
at org.apache.batik.util.ParsedURLData.openStreamInternal(Unknown 
Source)
at org.apache.batik.util.ParsedURLData.openStream(Unknown Source)
at org.apache.batik.util.ParsedURL.openStream(Unknown Source)
at 
org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown 
Source)
at org.apache.batik.bridge.DocumentLoader.loadDocument(Unknown Source)
at org.apache.batik.bridge.URIResolver.getNode(Unknown Source)
at org.apache.batik.bridge.URIResolver.getElement(Unknown Source)
at 
org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown Source)
at org.apache.batik.bridge.CSSUtilities.convertClipPath(Unknown Source)
at 
org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNode(Unknown

Source)
at 
org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown 
Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
at org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(Unknown 
Source)
at org.apache.fop.render.pdf.PDFRenderer.renderSVGArea(Unknown Source)
at org.apache.fop.svg.SVGArea.render(Unknown Source)
at 
org.apache.fop.render.pdf.PDFRenderer.renderForeignObjectArea(Unknown 
Source)
at org.apache.fop.layout.inline.ForeignObjectArea.render(Unknown Source)
at org.apache.fop.render.AbstractRenderer.renderLineArea(Unknown Source)
at org.apache.fop.layout.LineArea.render(Unknown Source)
at org.apache.fop.render.AbstractRenderer.renderBlockArea(Unknown 
Source)
at org.apache.fop.layout.BlockArea.render(Unknown Source)
at 
org.apache.fop.render.AbstractRenderer.renderAreaContainer(Unknown Source)
at org.apache.fop.layout.ColumnArea.render(Unknown Source)
at org.apache.fop.render.AbstractRenderer.renderSpanArea(Unknown Source)
at org.apache.fop.layout.SpanArea.render(Unknown Source)
at 
org.apache.fop.render.AbstractRenderer.renderBodyAreaContainer(Unknown 
Source)
at org.apache.fop.render.pdf.PDFRenderer.renderPage(Unknown Source)
at org.apache.fop.render.pdf.PDFRenderer.render(Unknown Source)
at org.apache.fop.apps.StreamRenderer.queuePage(Unknown Source)
at org.apache.fop.layout.AreaTree.addPage(Unknown Source)
at org.apache.fop.fo.pagination.PageSequence.format(Unknown Source)
at org.apache.fop.apps.StreamRenderer.render(Unknown Source)
at org.apache.fop.fo.FOTreeBuilder.endElement(Unknown Source)
at 
org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:147)
at 
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.
java:307)
at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
684)
at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
678)
at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
at 
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
Impl.java:2008)
at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1171)
at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3135)
at java.lang.Thread.run(Thread.java:536)

Here is the start of the SVG element:

fo:block
fo:instream-foreign-object height=480px width=640px
svg fill-opacity=1 color-rendering=auto 
color-interpolation=auto stroke

Re: Perplexing PDF SVG question

2003-06-23 Thread Irving Salisbury III
I am on windows XP using cocoon-2.0.4.  I understand the headless issue 
and that is not my problem. 

On the same box, I use the same version of fop (0.20.4), and the command 
line fop.bat file renders it perfectly.  Running inisde cocoon gives me 
the error that I outlined below.

Irv

Schaper, Christoph wrote:

Just guessing: You are on Unix and you don't have the display variable set
when you run  cocoon? 
If this is the case, either point the display variable to your X environment
or, if you don't have one search in the cocoon docu for headless.

Christoph

-Original Message-
From: Irving Salisbury III [mailto:[EMAIL PROTECTED]
Sent: 23 June 2003 15:27
To: [EMAIL PROTECTED]
Subject: Perplexing PDF SVG question
I have embedded an SVG image into my xsl:fo document.  It renders fine 
when using command line fop.  However, when I put it in a cocoon 
pipeline, I am getting the following error:

ERROR   (2003-06-23) 08:02.42:903   [sitemap.serializer.fo2pdf.fop] 
(/medicaid/sequence/first/pdf) Thread-10/PDFRenderer: svg graphic could 
not be built: null
java.lang.NullPointerException
   at java.net.URL.init(URL.java:366)
   at java.net.URL.init(URL.java:329)
   at java.net.URL.init(URL.java:321)
   at java.net.URL.init(URL.java:252)
   at java.net.URL.init(URL.java:275)
   at org.apache.batik.util.ParsedURLData.buildURL(Unknown Source)
   at org.apache.batik.util.ParsedURLData.openStreamInternal(Unknown 
Source)
   at org.apache.batik.util.ParsedURLData.openStream(Unknown Source)
   at org.apache.batik.util.ParsedURL.openStream(Unknown Source)
   at 
org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown 
Source)
   at org.apache.batik.bridge.DocumentLoader.loadDocument(Unknown Source)
   at org.apache.batik.bridge.URIResolver.getNode(Unknown Source)
   at org.apache.batik.bridge.URIResolver.getElement(Unknown Source)
   at 
org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown Source)
   at org.apache.batik.bridge.CSSUtilities.convertClipPath(Unknown Source)
   at 
org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNode(Unknown

Source)
   at 
org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown 
Source)
   at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
   at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
   at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
   at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
   at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
   at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
   at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
   at org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(Unknown 
Source)
   at org.apache.fop.render.pdf.PDFRenderer.renderSVGArea(Unknown Source)
   at org.apache.fop.svg.SVGArea.render(Unknown Source)
   at 
org.apache.fop.render.pdf.PDFRenderer.renderForeignObjectArea(Unknown 
Source)
   at org.apache.fop.layout.inline.ForeignObjectArea.render(Unknown Source)
   at org.apache.fop.render.AbstractRenderer.renderLineArea(Unknown Source)
   at org.apache.fop.layout.LineArea.render(Unknown Source)
   at org.apache.fop.render.AbstractRenderer.renderBlockArea(Unknown 
Source)
   at org.apache.fop.layout.BlockArea.render(Unknown Source)
   at 
org.apache.fop.render.AbstractRenderer.renderAreaContainer(Unknown Source)
   at org.apache.fop.layout.ColumnArea.render(Unknown Source)
   at org.apache.fop.render.AbstractRenderer.renderSpanArea(Unknown Source)
   at org.apache.fop.layout.SpanArea.render(Unknown Source)
   at 
org.apache.fop.render.AbstractRenderer.renderBodyAreaContainer(Unknown 
Source)
   at org.apache.fop.render.pdf.PDFRenderer.renderPage(Unknown Source)
   at org.apache.fop.render.pdf.PDFRenderer.render(Unknown Source)
   at org.apache.fop.apps.StreamRenderer.queuePage(Unknown Source)
   at org.apache.fop.layout.AreaTree.addPage(Unknown Source)
   at org.apache.fop.fo.pagination.PageSequence.format(Unknown Source)
   at org.apache.fop.apps.StreamRenderer.render(Unknown Source)
   at org.apache.fop.fo.FOTreeBuilder.endElement(Unknown Source)
   at 
org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:147)
   at 
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.
java:307)
   at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
684)
   at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
   at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
678)
   at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
   at 
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
Impl.java:2008)
   at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1171

Re: Perplexing PDF SVG question

2003-06-23 Thread Torsten Spindler
On Mon, 2003-06-23 at 15:27, Irving Salisbury III wrote:
 ERROR   (2003-06-23) 08:02.42:903   [sitemap.serializer.fo2pdf.fop] 
 (/medicaid/sequence/first/pdf) Thread-10/PDFRenderer: svg graphic could 
 not be built: null

If you use batik for rendering SVGs you need an X-Server running or Java
configured to run headless (java.awt.headless=true). As the latter may
introduce some problems (according to
http://wiki.cocoondev.org/Wiki.jsp?page=Cocoon2.1m2SetupLinuxredhat8.0) 

I start Xvfb from a start script (on RedHat 7.3):

export DISPLAY=:1
if [ ! -f /tmp/.X1-lock ]; then
/usr/X11R6/bin/Xvfb $DISPLAY -screen 0 800x600x8 
else
echo X-Server already running
fi

Bye,
Torsten


signature.asc
Description: This is a digitally signed message part


Re: Perplexing PDF SVG question

2003-06-23 Thread Irving Salisbury III




I am running this on windows XP. Do I still need to do this?

Irv

Torsten Spindler wrote:

  On Mon, 2003-06-23 at 15:27, Irving Salisbury III wrote:
  
  
ERROR   (2003-06-23) 08:02.42:903   [sitemap.serializer.fo2pdf.fop] 
(/medicaid/sequence/first/pdf) Thread-10/PDFRenderer: svg graphic could 
not be built: null

  
  
If you use batik for rendering SVGs you need an X-Server running or Java
configured to run headless (java.awt.headless=true). As the latter may
introduce some problems (according to
http://wiki.cocoondev.org/Wiki.jsp?page=Cocoon2.1m2SetupLinuxredhat8.0) 

I start Xvfb from a start script (on RedHat 7.3):

export DISPLAY=:1
if [ ! -f /tmp/.X1-lock ]; then
/usr/X11R6/bin/Xvfb $DISPLAY -screen 0 800x600x8 
else
echo "X-Server already running"
fi

Bye,
Torsten
  





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



Re: Perplexing PDF SVG question

2003-06-23 Thread J.Pietschmann
Irving Salisbury III wrote:

I have embedded an SVG image into my xsl:fo document.  It renders fine 
when using command line fop.  However, when I put it in a cocoon 
pipeline, I am getting the following error:

ERROR   (2003-06-23) 08:02.42:903   [sitemap.serializer.fo2pdf.fop] 
...
java.lang.NullPointerException
   at java.net.URL.init(URL.java:366)
...
   at org.apache.batik.util.ParsedURLData.buildURL(Unknown Source)
You seem to have an internal reference like gradient id=#foo
in an inlined SVG. Don't do this, it wont work. And no, strictly
spoken this is not even a bug. Either reference the SVG as external
graphic, or use a full absolute URL to an external URL for the
reference.
J.Pietschmann



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


Re: Perplexing PDF SVG question

2003-06-23 Thread Irving Salisbury III
I am using a third partly library that does things like  url( 
#someReference), so I can't get around it. 

Why is this not a bug, it seems like something that should be supported, 
and batik even has a bug fix in 1.5b4 (that happens to break the library 
code for me)

Irv

J.Pietschmann wrote:

Irving Salisbury III wrote:

I have embedded an SVG image into my xsl:fo document.  It renders 
fine when using command line fop.  However, when I put it in a cocoon 
pipeline, I am getting the following error:

ERROR   (2003-06-23) 08:02.42:903   [sitemap.serializer.fo2pdf.fop] 
...

java.lang.NullPointerException
   at java.net.URL.init(URL.java:366)
...

   at org.apache.batik.util.ParsedURLData.buildURL(Unknown Source)


You seem to have an internal reference like gradient id=#foo
in an inlined SVG. Don't do this, it wont work. And no, strictly
spoken this is not even a bug. Either reference the SVG as external
graphic, or use a full absolute URL to an external URL for the
reference.
J.Pietschmann



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


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


Re: Perplexing PDF SVG question

2003-06-23 Thread J.Pietschmann
Irving Salisbury III wrote:

I am using a third partly library that does things like  url( 
#someReference), so I can't get around it.
Why is this not a bug, it seems like something that should be supported, 
and batik even has a bug fix in 1.5b4 (that happens to break the library 
code for me)
Both the SVG and FO spec avoid even talking on how url(#stuff) should
be interpreted if the SVG is embedded in a FO document. Actually,
the whole semantic of embedded content is processor dependent, in
other words we could do what we see fit. Therefore, as I said, this
is spec conformant, read: no bug. I agree that it violates user
assumptions on how the whole mess ought to be resolved. There are a
few hurdles on the way which prevent simple fixes on the FOP side
though.
J.Pietschmann



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


Re: Perplexing PDF SVG question

2003-06-23 Thread Irving Salisbury III
Thanks for the info.  I will go down another path with this. 

Irv

J.Pietschmann wrote:

Irving Salisbury III wrote:

I am using a third partly library that does things like  url( 
#someReference), so I can't get around it.
Why is this not a bug, it seems like something that should be 
supported, and batik even has a bug fix in 1.5b4 (that happens to 
break the library code for me)


Both the SVG and FO spec avoid even talking on how url(#stuff) should
be interpreted if the SVG is embedded in a FO document. Actually,
the whole semantic of embedded content is processor dependent, in
other words we could do what we see fit. Therefore, as I said, this
is spec conformant, read: no bug. I agree that it violates user
assumptions on how the whole mess ought to be resolved. There are a
few hurdles on the way which prevent simple fixes on the FOP side
though.
J.Pietschmann



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


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


simple question

2003-06-21 Thread Sonny Sukumar
Hi guys,

I'm trying to use the xsl:output element in my logicsheet (for an 
accompanying XSP) to remove the XML declaration (the ?xml version=1.0?) 
from my output doc.  I just put xsl:output method=xml 
omit-xml-declaration=yes/ right inside my opening xsl:stylesheet tag.

However, in the processing of the stylesheet itself, this 
ProcessingException is thrown:

org.apache.cocoon.ProcessingException: Exception during processing of 
file:/jakarta-tomcat-4.1.12/webapps/cocoon/mysite/stylesheets/my_logicsheet.xsl: 
java.io.UTFDataFormatException: invalid byte 1 of 1-byte UTF-8 sequence 
(0xa0)

I also tried adding the 'encoding=UTF-8' attribute/value to the xsl:output 
tag, but I got the same error.

Can anyone shed some light on this for me?

Thanks,

Sonny

_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


RE: simple question

2003-06-21 Thread Geoff Howard
you have to do this in the setup of the serializer in sitemap.xmap.  See
the docs for details.  Remember if you need some pipelines to use
different settings, you can set up the same serializer class under
different pipeline shortcut names with different configs.  You may
be able to do this per-pipeline inside map:serialize but I don't
know about that.

HTH,
Geoff Howard

 -Original Message-
 From: Sonny Sukumar [mailto:[EMAIL PROTECTED]
 Sent: Saturday, June 21, 2003 6:08 PM
 To: [EMAIL PROTECTED]
 Subject: simple question



 Hi guys,

 I'm trying to use the xsl:output element in my logicsheet (for an
 accompanying XSP) to remove the XML declaration (the ?xml
 version=1.0?)
 from my output doc.  I just put xsl:output method=xml
 omit-xml-declaration=yes/ right inside my opening xsl:stylesheet tag.

 However, in the processing of the stylesheet itself, this
 ProcessingException is thrown:

 org.apache.cocoon.ProcessingException: Exception during processing of
 file:/jakarta-tomcat-4.1.12/webapps/cocoon/mysite/stylesheets/my_l
 ogicsheet.xsl:
 java.io.UTFDataFormatException: invalid byte 1 of 1-byte UTF-8 sequence
 (0xa0)

 I also tried adding the 'encoding=UTF-8' attribute/value to the
 xsl:output
 tag, but I got the same error.

 Can anyone shed some light on this for me?

 Thanks,

 Sonny

 _
 Protect your PC - get McAfee.com VirusScan Online
 http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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





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



JavaScript Flow/Sendmail Action Question

2003-06-17 Thread whump
Sorry to jump into the list with a question rightaway.

I'm working off of Milestone 1, using JVM 1.4.1 on Mac OS X 10.2.6, 
built with 'war'. And the java mail and activation jars in the 
appropriate places. I've been able to confirm that Sendmail is working.

I've started from the flowscript example in:

http://localhost:8080/cocoon/samples/xmlform/flow

The relevant sitemap fragment is (and yes, the sendmail action was 
declared in the components):

 map:pipeline

!--AMP Work Planning Wizard, using the Cocoon Flow Layer --

  map:match pattern=workPlanning
map:call function=xmlForm
  map:parameter name=xmlform-function 
value=workPlanningWizard/
	  map:parameter name=xmlform-id value=form-feedback/
  map:parameter name=xmlform-validator-schema-ns 
value=http://www.ascc.net/xml/schematron/
  map:parameter name=xmlform-validator-schema 
value=schematron/wizard-xmlform-sch-report.xml/
  map:parameter name=xmlform-scope value=session/
/map:call
  /map:match

  map:match pattern=workPlanning/*.xml
	  !-- original XMLForm document --
	  map:generate src=workPlanning/{1}.xml/
	
	  !-- populating the document with model instance data --
	  map:transform type=xmlform  label=xml/
	
	  !-- personalizing the look and feel of the form controls  --
	  map:transform type=xalan src=stylesheets/wizard2html.xsl /
	
	  !-- Transforming the XMLForm controls to HTML controls --
	  map:transform 
src=context://stylesheets/system/xmlform2html.xslt /
	
	  !-- sending the HTML back to the browser --
	  map:serialize type=html label=debug/
	/map:match
	
	!-- Need to get the sendmail action built --
	map:match pattern=workPlanning/send		
		map:act type=sendmail
			map:parameter name=smtphost value=relay.apple.com/
			map:parameter name=from value=[EMAIL PROTECTED]/
			map:parameter name=to value=[EMAIL PROTECTED]/
			map:parameter name=subject value=AMP: Work Planning Form/
			map:parameter name=body value=Here are the results of the work 
planning form you completed. /
			map:parameter name=attachments 
value=context://workPlanning/confirm.xml /
			map:generate src=workPlanning/end.xml/
			map:serialize type=html/
		/map:act
	/map:match
		
/map:pipeline

And the relevant part of the flowscript is:

 xform.setModel(bean);

xform.sendView(userIdentity,
   workPlanning/userIdentity.xml,
   function(xform) {
var bean = xform.getModel();
});
print(handling user identity);
xform.sendView(work,
   workPlanning/work.xml,
   function(xform) {
var bean = xform.getModel();
});
xform.sendView(confirm, workPlanning/confirm.xml);

print(handling confirm);
xform.sendView(confirm, workPlanning/send);
xform.finish(workPlanning/end.xml);
print(done);
The problem comes when starting from the continuation for 
workPlanning/send.

Note from the sitemap that I want to attach a file (for now, just the 
XForm with the bean values inserted, later a PDF generated from the 
form) to the mail.

So I'm calling out to a URI in the current context to regenerate the 
XML with the form data.

However, as I'm tailing the sitemap log. We get an error from the 
Sendmail action. But we don't get the normal cocoon error page, 
instead, we're redirected to a generic Cocoon 404 handler page.

So the questions I have:

1) Can I re-enter the flow from outside the match, or do I need another 
flow to generate the attachment?

2) Perhaps I'm doing this the wrong way, however, since there's not 
much out there on flow, I'm learning by experiment.

-- whump

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


A question on where to place the Cocoon

2003-06-13 Thread Anne Kwong
Hi 

For the software that I am working on, I have to generate report to serve UI requests and to generate report to serve a scheduled report delivery via email. Since the report delivery is done in the EJB level and the report for the browser is in the UI level, I want to ask if I should put the Cocoon stuff in the EJB layer or in the UI layer or both. 

Could someone give a suggestion?
Thank you very much in advance for all your help.

Thanks,
Anne
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).

xsl:import question

2003-06-12 Thread Markus Alin
Hi!!

I'm using a computational stylesheet with alot of trigonometry templates
which I include into whatever style sheet which needs it with the
xsl:import tag. I ofcourse want the computational stylesheet to be
available all over the application and I don't want to keep duplicate
copies of it. The only way i found to achieve this was to work with
relative directory paths. It currently looks like:

xsl:import href=../../../../../resources/stylesheets/trignm.xsl/

This ofcource makes the system very static and is from my point of view
a violation against the whole sitemap philosophy. Are there any plans to
change this or are there any alternative ways to achieve the same
thing??

/Thnxs Markus



===
Markus Alin tel: +41 1 455 70 03
Swissrisk AGfax: +41 1 455 70 01
Räffelstrasse 32mailto:[EMAIL PROTECTED]
8045 Zürich www.swissrisk.com
===



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



Re: xsl:import question

2003-06-12 Thread Richard in Public
Hi Markus

I haven't tried any of this, but it occured to me that you could improve
things somewhat by mounting a 'trig-sub-sitemap', or perhaps even a
library sub-sitemap.

(I cannot remember whether it would be sufficient to do this in your
main sitemap only (i.e. the one in the cocoon root directory) or whether
you would need to mount it in each 'local' sitemap)

Steps would be something like this:

1.  Create directory (e.g. c:/cocoon/lib/trig)
2.  Add to relevant sitemap (try main sitemap first) 

map:match pattern=cocoon-library/** 
  map:mount uri-prefix=cocoon-library check-reload=yes
src=c:/cocoon/lib/sitemap.xmap/
/map:match

3.  Mount each library to the main library sitemap

Another way of putting this is to make the trig stylesheets available as
a separate coocoon site, which all of your projects can draw on.

I know this is a bit of a fuzzy description, but that's how my mind is
right now.  Hope this helps!

Richard



On Thu, 2003-06-12 at 10:08, Markus Alin wrote:
 Hi!!
 
 I'm using a computational stylesheet with alot of trigonometry templates
 which I include into whatever style sheet which needs it with the
 xsl:import tag. I ofcourse want the computational stylesheet to be
 available all over the application and I don't want to keep duplicate
 copies of it. The only way i found to achieve this was to work with
 relative directory paths. It currently looks like:
 
 xsl:import href=../../../../../resources/stylesheets/trignm.xsl/
 
 This ofcource makes the system very static and is from my point of view
 a violation against the whole sitemap philosophy. Are there any plans to
 change this or are there any alternative ways to achieve the same
 thing??
 
 /Thnxs Markus
 
 
 
 ===
 Markus Alin tel: +41 1 455 70 03
 Swissrisk AGfax: +41 1 455 70 01
 Räffelstrasse 32mailto:[EMAIL PROTECTED]
 8045 Zürich www.swissrisk.com
 ===
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: xsl:import question

2003-06-12 Thread Joerg Heinicke
Hello Markus,

no guarantee that it works, but what about the following:

xsl:import href=cocoon:/trignm.xsl/

Now you must add a pipeline to your sitemap:

map:match pattern=trignm.xsl
  map:read src=path/to/xsl/trignm.xsl mime-type=text/xml/
/map:match
With this solution you have added a further mapping layer: You can 
change the location of your trignm.xsl without changing the import 
statements in every refering stylesheet.

If you have different sub sitemaps, you can add the above pipeline to 
the root sitemap and change the import path to cocoon://trignm.xsl 
(double slash).

Another possibility is to use the context:// protocol which refers to 
the servlet context. Now you were working on the file system: 
context://resources/stylesheets/trignm.xsl.

Find more about the cocoon protocols at 
http://cocoon.apache.org/2.0/userdocs/concepts/sitemap.html (in the 
middle of the page).

Joerg

Markus Alin wrote:
Hi!!

I'm using a computational stylesheet with alot of trigonometry templates
which I include into whatever style sheet which needs it with the
xsl:import tag. I ofcourse want the computational stylesheet to be
available all over the application and I don't want to keep duplicate
copies of it. The only way i found to achieve this was to work with
relative directory paths. It currently looks like:
xsl:import href=../../../../../resources/stylesheets/trignm.xsl/

This ofcource makes the system very static and is from my point of view
a violation against the whole sitemap philosophy. Are there any plans to
change this or are there any alternative ways to achieve the same
thing??
/Thnxs Markus


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


Newbie Question: Where do I add actions to sitemap?

2003-05-29 Thread Ross Bleakney
Cocooners,
I have created an action, but I need to modify my sitemap.xmap like so:

map:actions
map:action name=myName src=com.mycompany.myclass /
/map:actions

Where do I put this? I've tried putting it before the components, after
the components, etc. I've looked at a bunch of examples, but they don't
show the entire file (only snippets).

Thanks,
Ross





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



RE: Newbie Question: Where do I add actions to sitemap?

2003-05-29 Thread Steven Cummings
Actions go *inside* components (actions are a type of component, like generator, 
serializer, transformer, etc.):

map:sitemap ...
  map:components
map:actions.../map:actions
map:generators/map:transformers/ etc. etc.

HTH

/S

Ross Bleakney [EMAIL PROTECTED] wrote:

Cocooners,
I have created an action, but I need to modify my sitemap.xmap like so:

map:actions
map:action name=myName src=com.mycompany.myclass /
/map:actions

Where do I put this? I've tried putting it before the components, after
the components, etc. I've looked at a bunch of examples, but they don't
show the entire file (only snippets).

Thanks,
Ross





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




-- 
Steven Cummings
Columbia, MO
Email: [EMAIL PROTECTED]
AIM:   cummingscs
ICQ:   3330114
MSN:   [EMAIL PROTECTED]


__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

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



Re: Newbie Question: Where do I add actions to sitemap?

2003-05-29 Thread Ross Bleakney
Nevermind, I found the answer: put the actions element inside
components/components
Thanks,
Ross

On Wed, 2003-05-28 at 17:35, Ross Bleakney wrote:
 Cocooners,
 I have created an action, but I need to modify my sitemap.xmap like so:
 
 map:actions
 map:action name=myName src=com.mycompany.myclass /
 /map:actions
 
 Where do I put this? I've tried putting it before the components, after
 the components, etc. I've looked at a bunch of examples, but they don't
 show the entire file (only snippets).
 
 Thanks,
 Ross
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



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



Re: XMLForm Question

2003-04-12 Thread Antonio Gallardo
I think the problem can be related with the improper shutdown of the
current CVS 2.1 with Tomcat. Try to kill the process after the shutdown.

Antonio Gallardo.

JD Daniels dijo:
 Yes, I guess I should have mentioned that I did in fact delete my tomcat
 work directory, shutdown and startup. It did not make a difference...
 hence my frustration :)

 I know that when I get this crap figured out, I will never hack php
 again :D The trick is getting it figured heh heh.

 JD
   - Original Message -
   From: David Kavanagh
   To: [EMAIL PROTECTED]
   Sent: Saturday, April 12, 2003 9:05 AM
   Subject: Re: XMLForm Question


   I think you just need to restart the container (in your case, tomcat).
 In theory, Tomcat use an adaptive classloader that you can configure
 (in server.xml) to reload classes when they change. I was able to use
 this feature when my web app was simple. Once I started having more
 statefull information in memory, I really needed to restart the whole
 app (and tomcat) when I changed my code.  BTW, If you were to use
 JBoss/Jetty, you should be able to take advantage of the JBoss
 hot-deploy feature. The idea being if you touch the web.xml under
 cocoon, jboss should redeploy the app, and pick up your code change.
 At this point, JBoss exits when I try this. I'm sure I'm doing
 something wrong.

   David

   JD Daniels wrote:

 Thanks for the answer Sylvain

 That was what I had thought... after I restarted my machine, it all
 started working.




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



Question from a newbie

2003-04-01 Thread Sean McCormick
Hi folks,

I apologize in advance if this mailing list is not the appropriate
place for this question, but I think I've nearly worn out Google
trying to find the solution to my problem. I have been asked to locate
software that can dynamically create a newsletter from numerous RSS
feeds according to individual user preferences and then pass it along
to a message transfer agent.  Here is the process my boss envisions:

  1.. Readers subscribe to a newsletter, and specify the content areas
and sub-domains they would like to receive information on.

  2.. Each newsletter is dynamically generated with the content
specified by the individual subscriber.

  3.. The newsletter is emailed to the subscriber.

All of my research indicates that Apache Cocoon is practically manna
from heaven in this area, except that I can't find any examples of it
being used for e-mail applications - just Web applications. Is anyone
here aware of whether or not Cocoon can be put to work with dynamic
e-mail applications? If so, are there any examples I can show my boss?

Any information/advice is appreciated.

Regards,

Sean McCormick
---
Digiteyesed Photography
http://www.digiteyesed.com/
Free desktop wallpaper for download.


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



RE: Question from a newbie

2003-04-01 Thread Jeff Sallade
Sean,

This is exaclty the type of application that is demonstrated in
the book, Cocoon:  Building XML Applications by Matthew Langham
and Carsten Ziegeler, published by New Riders.  There are 3 versions
of a news portal that increase in complexity.  I have found the
book to be a great resource for Cocoon in general and it should
have exactly what you need.  I'm sure the book is widely available.

Jeff Sallade

-Original Message-
From: Sean McCormick [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 10:51 AM
To: [EMAIL PROTECTED]
Subject: Question from a newbie


Hi folks,

I apologize in advance if this mailing list is not the appropriate
place for this question, but I think I've nearly worn out Google
trying to find the solution to my problem. I have been asked to locate
software that can dynamically create a newsletter from numerous RSS
feeds according to individual user preferences and then pass it along
to a message transfer agent.  Here is the process my boss envisions:

  1.. Readers subscribe to a newsletter, and specify the content areas
and sub-domains they would like to receive information on.

  2.. Each newsletter is dynamically generated with the content
specified by the individual subscriber.

  3.. The newsletter is emailed to the subscriber.

All of my research indicates that Apache Cocoon is practically manna
from heaven in this area, except that I can't find any examples of it
being used for e-mail applications - just Web applications. Is anyone
here aware of whether or not Cocoon can be put to work with dynamic
e-mail applications? If so, are there any examples I can show my boss?

Any information/advice is appreciated.

Regards,

Sean McCormick
---
Digiteyesed Photography
http://www.digiteyesed.com/
Free desktop wallpaper for download.


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

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



Re: Question from a newbie

2003-04-01 Thread Sean McCormick
Jeff,

You've made my day - thank you so much! I've just ordered both Cocoon
books that are available from New Riders.

Sean
---
Digiteyesed Photography
http://www.digiteyesed.com/
Free desktop wallpaper for download.

- Original Message -
From: Jeff Sallade [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 2:45 PM
Subject: RE: Question from a newbie


: Sean,
:
: This is exaclty the type of application that is demonstrated in
: the book, Cocoon:  Building XML Applications by Matthew Langham
: and Carsten Ziegeler, published by New Riders.  There are 3 versions
: of a news portal that increase in complexity.  I have found the
: book to be a great resource for Cocoon in general and it should
: have exactly what you need.  I'm sure the book is widely available.
:
: Jeff Sallade


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



Question about doctype with Cocoon 1.8.2

2003-03-31 Thread David Lanfranconi
Title: Question about doctype with Cocoon 1.8.2






Hi!

How can I remove the DOCTYPE declaration in an output HTML ???

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0//EN http://www.w3.org/TR/REC-html40/strict.dtd

I have a problem with _javascript_ and I dont have a solution

Thanks!

Dave







Newbie question about CSS display

2003-03-28 Thread Joe Williams
Forgive the elementary nature of this question, but I am new to Cocoon, my
background is documentation and not development, and I have read and
searched for an explanation for this weirdness without success.

Using DocBook XML and the DocBook XSL with a customization layer, I want to
change the styles using a CSS.

My formatting changes are displayed when I run the transformation from the
command line, but not when I use Cocoon.

Is this to be expected, or what? Does the transformation occur differently
when using Cocoon than when using Xalan alone?

A helpful link or answer would be appreciated.


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



Re: Newbie question about CSS display

2003-03-28 Thread Yves Vindevogel
Check your sitemap ... You probably don't have the correct pipeline/match for 
it.

 Forgive the elementary nature of this question, but I am new to Cocoon, my
 background is documentation and not development, and I have read and
 searched for an explanation for this weirdness without success.

 Using DocBook XML and the DocBook XSL with a customization layer, I want to
 change the styles using a CSS.

 My formatting changes are displayed when I run the transformation from the
 command line, but not when I use Cocoon.

 Is this to be expected, or what? Does the transformation occur differently
 when using Cocoon than when using Xalan alone?

 A helpful link or answer would be appreciated.


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

-- 
Met vriendelijke groeten,
Kind regards,
Bien à vous,

Yves Vindevogel

Implements
Kempische Steenweg 206  --  3500 Hasselt  --  Belgium
Phone/Fax: +32 (11) 43.55.76  --  Mobile: +32 (478) 80.82.91
Mail: [EMAIL PROTECTED]  --  www.implements.be

Quote: The winner never says participating is more important than winning.

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



Re: Newbie question about CSS display

2003-03-28 Thread Lionel Crine
Joe,

you're question is so wide.

Here is how I use a CSS in an XSL file.

load the CSS.

map:pipeline
  map:match pattern=style/*.css
map:read mime-type=text/css src=demo/{1}.css/
  /map:match
/map:pipeline
load the file :

map:match pattern=welcome
  map:generate type=file src=proto/xml/welcome.xml/
  map:transform type=xslt src=proto/xsl/welcome.xsl/
  map:serialize type=html/
/map:match
In the XSL file :

xsl:template match=/
  html
   head
  link rel=stylesheet type=text/css href=style.css/ -- link 
to the style.
   /head
   body
xsl:apply-templates/
   /body
  /html
/xsl:template



hope this help.
At 17:19 28/03/2003 +0100, you wrote:
Hello Joe,

you don't give very exact error description, only it does not work. So 
it's only possible to guess. Or you give us more information.

I guess the error is a missing or a wrong match for the CSS.

The information you can provide:

1. Which URL do you type in the browser for the Cocoon delivered HTML.

2. How does the according match pattern in the sitemap for the docbook 
transformation look like.

3. How does the link/ tag for the CSS in the generated HTML look like?

4. How does the according match pattern in the sitemap for the CSS look like?

The transformation offline or in Cocoon may be different (but I don't 
really think so), but has nothing to do with the loading of the CSS.

Regards,

Joerg

Joe Williams wrote:
Forgive the elementary nature of this question, but I am new to Cocoon, my
background is documentation and not development, and I have read and
searched for an explanation for this weirdness without success.
Using DocBook XML and the DocBook XSL with a customization layer, I want to
change the styles using a CSS.
My formatting changes are displayed when I run the transformation from the
command line, but not when I use Cocoon.
Is this to be expected, or what? Does the transformation occur differently
when using Cocoon than when using Xalan alone?
A helpful link or answer would be appreciated.
--

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: Newbie question about CSS display

2003-03-28 Thread Joe Williams
The link to the stylesheet appears in the HTML output.

I am using a sub-sitemap with the pipeline:

map:pipeline
map:match pattern=book
map:generate src=book.xml/
map:transform src=book.xsl
map:parameter name=css-stylesheet value=book.css/
/map:transform
map:serialize/
/map:match
map:match pattern=*.css
map:read src={1}.css mime-type=text/css/
/map:match
/map:pipeline

And I am adding the parameters to my DocBook customization layer, per Norm
and Bob's documentation:

xsl:param name=html.stylesheet select='book.css'/
xsl:param name=html.stylesheet.typetext/css/xsl:param

- Original Message -
From: Yves Vindevogel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 9:27 AM
Subject: Re: Newbie question about CSS display


Check your sitemap ... You probably don't have the correct pipeline/match
for
it.

 Forgive the elementary nature of this question, but I am new to Cocoon, my
 background is documentation and not development, and I have read and
 searched for an explanation for this weirdness without success.

 Using DocBook XML and the DocBook XSL with a customization layer, I want
to
 change the styles using a CSS.

 My formatting changes are displayed when I run the transformation from the
 command line, but not when I use Cocoon.

 Is this to be expected, or what? Does the transformation occur differently
 when using Cocoon than when using Xalan alone?

 A helpful link or answer would be appreciated.


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

--
Met vriendelijke groeten,
Kind regards,
Bien à vous,

Yves Vindevogel

Implements
Kempische Steenweg 206  --  3500 Hasselt  --  Belgium
Phone/Fax: +32 (11) 43.55.76  --  Mobile: +32 (478) 80.82.91
Mail: [EMAIL PROTECTED]  --  www.implements.be

Quote: The winner never says participating is more important than winning.

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



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



Re: Newbie question about CSS display

2003-03-28 Thread Lionel Crine
It's a little bit confused but if you want to do it.

You should declare do :
map:pipeline
map:match pattern=*.css
map:read src={1}.css mime-type=text/css/
/map:match
/map:pipeline
then :

map:pipeline
map:match pattern=book
map:generate src=book.xml/
map:transform src=book.xsl
map:parameter name=css-stylesheet value=cocoon:/book.css/  -- I'm 
not really sure value attribute can get a cocoon protocol, but why not.
/map:transform
map:serialize/
/map:match
/map:pipeline

In the xsl document :

xsl:param name=css-stylesheet select=book.css/ -- I'm not sure this 
is working because if you want to call an URL, you  should use the 
document() fonction like this.  document('host:8080/book.css).
xsl:param name=html.stylesheet.typetext/css/xsl:param



Lionel

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


Re: Newbie question about CSS display

2003-03-28 Thread Joerg Heinicke
Hello Joe,

Joe Williams wrote:
Thanks for the response, let me see if this makes things clearer.

I'm not getting an error message, but the formatting changes to the DocBook
XSL (by means of my CSS) do not appear in the browser.
The URL:

http://myserver:8080/cocoon/book/book

This succeeds in calling the document. When I view the source of the
displayed HTML, the link to the CSS stylesheet appears:
link href=book.css rel=stylesheet type=text/css
so far everything seems to be clear and ok. Try to access

http://myserver:8080/cocoon/book/book.css

in your browser to see if you get the CSS.

Therefore, I expect the changes to appear, but they do not. The CSS is in
the same directory (book) as the XML source (book.xml) the XSL
stylesheet (book.xsl) and the CSS (book.css)
This is more or less not interesting for the browser. Important is only the 
mapping in the sitemap. You wrote already you have the following two pipelines:

map:pipeline
  map:match pattern=book
map:generate src=book.xml/
map:transform src=book.xsl
  map:parameter name=css-stylesheet value=book.css/
/map:transform
map:serialize/
  /map:match
  map:match pattern=*.css
map:read src={1}.css mime-type=text/css/
  /map:match
/map:pipeline
Only here (= for the sitemap) the directories are interesting. As you wrote 
the pipeline it's correct to have both files in the same directory.

What do you want to reach with

map:parameter name=css-stylesheet value=book.css/

?? Do you have a global xsl:param name=css-stylesheet/ in your book.xsl? 
Otherwise the map:parameter/ is useless. You already configured your 
DocBook with

xsl:param name=html.stylesheet select='book.css'/

and that's correct.

This only for clarification. Test the stylesheet independent of the DocBook 
HTML with http://myserver:8080/cocoon/book/book.css;. If you get it, hmm, I 
don't know. If not, what do you get?

I have not tried Lionel's suggestions yet, but will do so.
Sorry, but this won't help you much. You don't want to include the CSS in 
the DocBook HTML, but a link element refering to the CSS. So you only must 
pass the CSS's name and not the CSS itself to the XSLT stylesheet.

Using document('host:8080/book.css') won't work either, because you can't 
read text with it, only XML.

And the third suggestion using a xsl:template match=// can break the 
DocBook transformation completely. Use the parameterization as suggested by 
Norman Walsh and as you already did it.

Regards,

Joerg

- Original Message -
From: Joerg Heinicke [EMAIL PROTECTED]

Hello Joe,

you don't give very exact error description, only it does not work. So
it's only possible to guess. Or you give us more information.
I guess the error is a missing or a wrong match for the CSS.

The information you can provide:

1. Which URL do you type in the browser for the Cocoon delivered HTML.

2. How does the according match pattern in the sitemap for the docbook
transformation look like.
3. How does the link/ tag for the CSS in the generated HTML look like?

4. How does the according match pattern in the sitemap for the CSS look
like?

The transformation offline or in Cocoon may be different (but I don't
really

think so), but has nothing to do with the loading of the CSS.

Regards,

Joerg
--

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Newbie question about CSS display

2003-03-28 Thread Joe Williams
When I try to reach the CSS directly, I get a Cocoon error (see below).

 What do you want to reach with

 map:parameter name=css-stylesheet value=book.css/

 ?? Do you have a global xsl:param name=css-stylesheet/ in your
book.xsl?

No, I do not. I commented that line out, and the link to the CSS still
appears in the HTML result, so it obviously doesn't do anything useful here.
Not sure why I put that in there, except for my newbieness...just hacking
around to see if I could get it to work.

 This only for clarification. Test the stylesheet independent of the
DocBook
 HTML with http://myserver:8080/cocoon/book/book.css;. If you get it, hmm,
I
 don't know. If not, what do you get?

When I follow the suggestion to access the CSS alone, I get this error:

type resource-not-found

message Resource not found

description The requested URI /cocoon/book/book.css was not found.

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

request-uri

/cocoon/book/book.css

path-info

book/book.css



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



Re: Newbie question about CSS display

2003-03-28 Thread Jörg Heinicke
  This only for clarification. Test the stylesheet independent of the
 DocBook
  HTML with http://myserver:8080/cocoon/book/book.css;. If you get it,
 hmm,
 I
  don't know. If not, what do you get?
 
 When I follow the suggestion to access the CSS alone, I get this error:
 
 type resource-not-found
 
 message Resource not found
 
 description The requested URI /cocoon/book/book.css was not found.
 
 sender org.apache.cocoon.servlet.CocoonServlet
 
 source Cocoon servlet
 
 request-uri
 
 /cocoon/book/book.css
 
 path-info
 
 book/book.css

Stupid mail client, simply ignores the reply-to header ...

I wrote, that the above error message is probably caused by the not found
CSS file on a place, where it should be to found, because it's specified in the
sitemap. There can not be many reasons:
1. the file is not in the same directory as the xml (according to the
earlier sent match patterns and pipelines),
2. the pipeline for the CSS does not look like the sent one
3. or there is another pipeline matching on *.css before the sent one. And
this one searches for the CSS file on another place on the disk.

A look into the log file, especially for stacktraces, will help I think.
Maybe one can see a FileNotFoundException (or Resource...) with the specified
path, where the file was searched for.

Regards,

Joerg

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


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



Re: Newbie question about CSS display

2003-03-28 Thread Joe Williams
 1. the file is not in the same directory as the xml (according to the
 earlier sent match patterns and pipelines),
 2. the pipeline for the CSS does not look like the sent one
 3. or there is another pipeline matching on *.css before the sent one. And
 this one searches for the CSS file on another place on the disk.

 A look into the log file, especially for stacktraces, will help I think.
 Maybe one can see a FileNotFoundException (or Resource...) with the
specified
 path, where the file was searched for.

In access.log:

WARN (2003--3-28) 16:41.55.945 [access] (/cocoon/book/book.css)
Thread-7/CocoonServlet: The resource was not found
org.apache.cocoon.ResourceNotFoundException: No pipeline matched request:
book/book.css

In sitemap.log:

DEBUG (2003-03-28) 16:41:55.909 [sitemap] (/cocoon/book/book.css)
Thread-7/sitemap_xmap: Matched wildcard pattern book/*
DEBUG (2003-03-28) 16:41:55.909 [sitemap] (/cocoon/book/book.css)
Thread-7/AbstractSitemap:
Current Sitemap Parameters:
PARAM: VALUE: 'book.css'
PARAM: '0' VALUE: 'book'/book.css'


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



Re: Newbie question about CSS display

2003-03-28 Thread Joe Williams
 Ah, interesting ;-) As I expected it ...

 Please have a look into the log files. You should get more information
 there, e.g. something like a stacktrace. It seems, that the book.css can't
be
 found on the disk, where it should be to found (as you specified it in the
 sitemap). But the pipeline matching on *.css you sent already in this
thread looked
 ok. Maybe another pipeline matches already earlier on *.css in the
sitemap?

There is a *.css in the main sitemap. Would that conflict with this one in
this sub-sitemap (cocoon/book/sitemap.xmap)?


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



Re: Newbie question about CSS display--CORRECTION

2003-03-28 Thread Joe Williams
There is no *.css in main sitemap, but I have not looked through all the
files.
- Original Message -
From: Joe Williams [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 4:52 PM
Subject: Re: Newbie question about CSS display


  Ah, interesting ;-) As I expected it ...
 
  Please have a look into the log files. You should get more information
  there, e.g. something like a stacktrace. It seems, that the book.css
can't
 be
  found on the disk, where it should be to found (as you specified it in
the
  sitemap). But the pipeline matching on *.css you sent already in this
 thread looked
  ok. Maybe another pipeline matches already earlier on *.css in the
 sitemap?
 
 There is a *.css in the main sitemap. Would that conflict with this one in
 this sub-sitemap (cocoon/book/sitemap.xmap)?


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



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



Re: Newbie question about CSS display

2003-03-28 Thread Joerg Heinicke
Hello Joe,

you don't give very exact error description, only it does not work. So 
it's only possible to guess. Or you give us more information.

I guess the error is a missing or a wrong match for the CSS.

The information you can provide:

1. Which URL do you type in the browser for the Cocoon delivered HTML.

2. How does the according match pattern in the sitemap for the docbook 
transformation look like.

3. How does the link/ tag for the CSS in the generated HTML look like?

4. How does the according match pattern in the sitemap for the CSS look like?

The transformation offline or in Cocoon may be different (but I don't really 
think so), but has nothing to do with the loading of the CSS.

Regards,

Joerg

Joe Williams wrote:
Forgive the elementary nature of this question, but I am new to Cocoon, my
background is documentation and not development, and I have read and
searched for an explanation for this weirdness without success.
Using DocBook XML and the DocBook XSL with a customization layer, I want to
change the styles using a CSS.
My formatting changes are displayed when I run the transformation from the
command line, but not when I use Cocoon.
Is this to be expected, or what? Does the transformation occur differently
when using Cocoon than when using Xalan alone?
A helpful link or answer would be appreciated.
--

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Newbie question about CSS display

2003-03-28 Thread Joe Williams
Thanks for the response, let me see if this makes things clearer.

I'm not getting an error message, but the formatting changes to the DocBook
XSL (by means of my CSS) do not appear in the browser.

The URL:

http://myserver:8080/cocoon/book/book

This succeeds in calling the document. When I view the source of the
displayed HTML, the link to the CSS stylesheet appears:

link href=book.css rel=stylesheet type=text/css

Therefore, I expect the changes to appear, but they do not. The CSS is in
the same directory (book) as the XML source (book.xml) the XSL
stylesheet (book.xsl) and the CSS (book.css)

I have not tried Lionel's suggestions yet, but will do so.


- Original Message -
From: Joerg Heinicke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 10:19 AM
Subject: Re: Newbie question about CSS display


 Hello Joe,

 you don't give very exact error description, only it does not work. So
 it's only possible to guess. Or you give us more information.

 I guess the error is a missing or a wrong match for the CSS.

 The information you can provide:

 1. Which URL do you type in the browser for the Cocoon delivered HTML.

 2. How does the according match pattern in the sitemap for the docbook
 transformation look like.

 3. How does the link/ tag for the CSS in the generated HTML look like?

 4. How does the according match pattern in the sitemap for the CSS look
like?

 The transformation offline or in Cocoon may be different (but I don't
really
 think so), but has nothing to do with the loading of the CSS.

 Regards,

 Joerg

 Joe Williams wrote:
  Forgive the elementary nature of this question, but I am new to Cocoon,
my
  background is documentation and not development, and I have read and
  searched for an explanation for this weirdness without success.
 
  Using DocBook XML and the DocBook XSL with a customization layer, I want
to
  change the styles using a CSS.
 
  My formatting changes are displayed when I run the transformation from
the
  command line, but not when I use Cocoon.
 
  Is this to be expected, or what? Does the transformation occur
differently
  when using Cocoon than when using Xalan alone?
 
  A helpful link or answer would be appreciated.

 --

 System Development
 VIRBUS AG
 Fon  +49(0)341-979-7419
 Fax  +49(0)341-979-7409
 [EMAIL PROTECTED]
 www.virbus.de


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



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



RE: XMLForm Schematron question

2003-03-27 Thread Delis, Christopher E.
 
thanks, ugo.

i finally ended up doing the same exact thing as you.  i was just hoping it
would be possible to refer to other (sibling or ancestor) objects in my
validation assertion.  not a huge problem.  i simply edited my
xmlform-to-html.xsl to reflect the fact that the error violation has an
attribute of ref='' instead of ref='/password'.

cheers,
chris

-Original Message-
From: Ugo Cei
To: [EMAIL PROTECTED]
Sent: 3/27/03 1:51 AM
Subject: Re: XMLForm Schematron question

Delis, Christopher E. wrote:
 i take it back!  it still doesn't work =-(
 
 i keep getting Passwords do not match! errors...

I'm currently using the following:

rule context=/
   assert test=string(password1) = string(password2)
 Passwords do not match.
   /assert
/rule


-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: [EMAIL PROTECTED]


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

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



Re: XMLForm Schematron question

2003-03-27 Thread Joerg Heinicke
Siblings? Try the following:

 rule context=/password
assert test=string(.) = string(following-sibling::password2 | 
preceding-sibling::password2)
  Passwords do not match.
/assert
 /rule

If you know password2 is always after password, you can remove 
preceding-sibling::password2.

It's only a further suggestion from the XML point of view ;-)

Joerg

Delis, Christopher E. wrote:
 
thanks, ugo.

i finally ended up doing the same exact thing as you.  i was just hoping it
would be possible to refer to other (sibling or ancestor) objects in my
validation assertion.  not a huge problem.  i simply edited my
xmlform-to-html.xsl to reflect the fact that the error violation has an
attribute of ref='' instead of ref='/password'.
cheers,
chris
-Original Message-
From: Ugo Cei
To: [EMAIL PROTECTED]
Sent: 3/27/03 1:51 AM
Subject: Re: XMLForm Schematron question
Delis, Christopher E. wrote:

i take it back!  it still doesn't work =-(

i keep getting Passwords do not match! errors...


I'm currently using the following:

rule context=/
   assert test=string(password1) = string(password2)
 Passwords do not match.
   /assert
/rule

--

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: XMLForm Schematron question

2003-03-27 Thread Delis, Christopher E.
thanks for inspiring me to continue... following-sibling and
preceding-sibling didn't work but the following did:

assert test=string(.)=string(password2)Passwords do not match!/assert

i thought they were siblings, but...

-Original Message-
From: Joerg Heinicke
To: [EMAIL PROTECTED]
Sent: 3/27/03 5:53 AM
Subject: Re: XMLForm Schematron question

Siblings? Try the following:

  rule context=/password
 assert test=string(.) = string(following-sibling::password2 | 
preceding-sibling::password2)
   Passwords do not match.
 /assert
  /rule

If you know password2 is always after password, you can remove 
preceding-sibling::password2.

It's only a further suggestion from the XML point of view ;-)

Joerg


Delis, Christopher E. wrote:
  
 thanks, ugo.
 
 i finally ended up doing the same exact thing as you.  i was just
hoping it
 would be possible to refer to other (sibling or ancestor) objects in
my
 validation assertion.  not a huge problem.  i simply edited my
 xmlform-to-html.xsl to reflect the fact that the error violation has
an
 attribute of ref='' instead of ref='/password'.
 
 cheers,
 chris
 
 -Original Message-
 From: Ugo Cei
 To: [EMAIL PROTECTED]
 Sent: 3/27/03 1:51 AM
 Subject: Re: XMLForm Schematron question
 
 Delis, Christopher E. wrote:
 
i take it back!  it still doesn't work =-(

i keep getting Passwords do not match! errors...
 
 
 I'm currently using the following:
 
 rule context=/
assert test=string(password1) = string(password2)
  Passwords do not match.
/assert
 /rule
 
 

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


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

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



RE: XMLForm Schematron question

2003-03-27 Thread Delis, Christopher E.
i jumped the gun again.  assert test=string(.)=string(password2) doesn't
work either.  it is always invalid because password2 is not a child.  i'm
happy with simply validating from context=/ and be done with it! ;-)
again, thanks...

-Original Message-
From: Delis, Christopher E.
To: 'Joerg Heinicke '; '[EMAIL PROTECTED] '
Sent: 3/27/03 4:50 AM
Subject: RE: XMLForm Schematron question

thanks for inspiring me to continue... following-sibling and
preceding-sibling didn't work but the following did:

assert test=string(.)=string(password2)Passwords do not
match!/assert

i thought they were siblings, but...

-Original Message-
From: Joerg Heinicke
To: [EMAIL PROTECTED]
Sent: 3/27/03 5:53 AM
Subject: Re: XMLForm Schematron question

Siblings? Try the following:

  rule context=/password
 assert test=string(.) = string(following-sibling::password2 | 
preceding-sibling::password2)
   Passwords do not match.
 /assert
  /rule

If you know password2 is always after password, you can remove 
preceding-sibling::password2.

It's only a further suggestion from the XML point of view ;-)

Joerg


Delis, Christopher E. wrote:
  
 thanks, ugo.
 
 i finally ended up doing the same exact thing as you.  i was just
hoping it
 would be possible to refer to other (sibling or ancestor) objects in
my
 validation assertion.  not a huge problem.  i simply edited my
 xmlform-to-html.xsl to reflect the fact that the error violation has
an
 attribute of ref='' instead of ref='/password'.
 
 cheers,
 chris
 
 -Original Message-
 From: Ugo Cei
 To: [EMAIL PROTECTED]
 Sent: 3/27/03 1:51 AM
 Subject: Re: XMLForm Schematron question
 
 Delis, Christopher E. wrote:
 
i take it back!  it still doesn't work =-(

i keep getting Passwords do not match! errors...
 
 
 I'm currently using the following:
 
 rule context=/
assert test=string(password1) = string(password2)
  Passwords do not match.
/assert
 /rule
 
 

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


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

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

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



TextParserGenerator question

2003-03-27 Thread Neil Davies
Is there actually a working TextParserGenerator? I've not seen any 
examples of anyone using it on the web.

I can't get Cocoon to recognise it in the sitemap decleration.

Thanks

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


Re: TextParserGenerator question

2003-03-27 Thread Bertrand Delacretaz
Le Jeudi, 27 mars 2003, à 13:47 Europe/Zurich, Neil Davies a écrit :

Is there actually a working TextParserGenerator? I've not seen any 
examples of anyone using it on the web
If you're using the latest CVS you'll find several Chaperon parser 
samples at http://localhost:/samples/chaperon/ , and the 
corresponding files in the source code under 
src/blocks/chaperon/samples.

-Bertrand

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


Re: TextParserGenerator question

2003-03-27 Thread Stephan Michels


On Thu, 27 Mar 2003, Neil Davies wrote:

 Is there actually a working TextParserGenerator? I've not seen any
 examples of anyone using it on the web.

 I can't get Cocoon to recognise it in the sitemap decleration.

Take a look into the current CVS HEAD. There is a new and cleaner
version of the chaperon components, which have some improvements for
the usability. There are also some more examples.

Stephan.


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



JSP in a box question (with POST)

2003-03-27 Thread Edward Elhauge
I've got a question for the wizards on this list.

I've been working with Cocoon since last December and think it is pretty
nifty. I like it a lot better than working with JSP and Custom Tags
(which is what we were doing before).

We basically are deploying an Intranet Bioinformatic Portal with a lot
of content but also integrating some heavy duty Web Applications. I've
managed to get Cocoon to create the portal layout, create XSLT transforms
to generate layout and even have the one major Webapp running within the
portal (and no frames).

The problem is that I've managed to do all this without using the POST
method in my FORMs. I think there was discussion on the list that
requestQuery would only pass the URL parameters (GET params) and my
experience bears that out. Ideally I know we should move to XSP but
that isn't practical for social organization reasons, anyway I would like
to run legacy Webapps within my portal tables (including ones on the net
that I can't rewrite). So how do I get around the POST problem? I'm
using a sitemap like this:

!--  --
!-- Portal Application Pipeline --
map:pipeline internal-only=true

map:match pattern=portalAppPipe/*.jsp
  map:act type=request
map:parameter name=parameters value=true /

map:generate type=html
src=http://localhost:8080/bioinfo/jsp/{../1}.jsp{requestQuery};
  map:parameter name=xpath value=/html/body/* /
/map:generate
  /map:act

map:serialize type=xml /
/map:match

/map:pipeline
!-- END: Portal Application Pipeline --

map:pipeline
map:match pattern=*.app
  map:aggregate element=portalPage
map:part element=portalMenuElement src=menus/home.xml /
map:part element=aggregate1Element src=cocoon:/portalAppPipe/{1}.jsp /
  /map:aggregate

  map:transform src=xsl/portalAggregate.xsl /
  map:transform src=xsl/bioxmlexpand.xsl /
  !--
  --

  !-- debug view (enable for debug)
  map:transform src=xsl/simple-xml2html.xsl/
  --

  map:serialize type=html /
/map:match

/map:pipeline

to run our JSPs within the Portal. It works like a charm but now there
are some apps with large TEXTAREA fields that aren't practical to change
to GET. What can I do?

One way around the problem that I tried was to use something like this:

map:pipeline

map:match pattern=result/*.jsp
  map:generate type=jsp src={1}.jsp /

  map:serialize type=xml /
/map:match

/map:pipeline

to run the JSPs within Cocoon, but whenever I put in any real JSP code
into the servlet it barfs with a 'Not Well Formed' message; which must
mean the servlet isn't really being executed, but just copied.

Any hints would be greatly appreciated.
--
Edward Elhauge [EMAIL PROTECTED] -- Uncanny, San Francisco
The gods confound the man who first found out how to distinguish hours.
Confound him, too, who in this place set up a sundial,
To cut and hack my days so wretchedly into small portions!
-- Titus Maccius Plautus (254 - 184 BCE)

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



XMLForm Schematron question

2003-03-26 Thread Rob Johnston
Hello -- I have a quick Schematron/XMLForm question.

Let's say I have the following XPath:

/data/selectedwhich can be either text or number
/data/number  a valid number

I want to write a validation pattern that will assert iff /data/selected
is 'number' and /data/number must be a number.

For instance:

rule context=/data/number
  assert test=number(.)=.
You must specify a valid number.
  /assert
/rule

works fine, but I want the above to happen ONLY if /data/selected is the
value number.  So if /data/selected is the value text, it will
completely ignore the check to see if the /data/number field is a
numeric value.

Any help would be appreciated.

thanks,
rob

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



Re: XMLForm Schematron question

2003-03-26 Thread Joerg Heinicke
Hello Rob,

you simply must add a predicate to the context:

rule context=/data/number[/data/selected = 'number']
  assert test=number(.)=.
You must specify a valid number.
  /assert
/rule
Furthermore I think you should change the test pattern. If someone writes 
5.0, it can return false. I have in mind 5.0 and 5, if the transformer tests 
on strings and not on numbers. (I had the same problem a few days ago with 
XSLT. Is the behaviour simply processor dependent or specified anywhere?) If 
you change the test to number() = number() you are on the safe side, 
because NaN = NaN returns always false.

Regards,

Joerg

Rob Johnston wrote:
Hello -- I have a quick Schematron/XMLForm question.

Let's say I have the following XPath:

/data/selectedwhich can be either text or number
/data/number  a valid number
I want to write a validation pattern that will assert iff /data/selected
is 'number' and /data/number must be a number.
For instance:

rule context=/data/number
  assert test=number(.)=.
You must specify a valid number.
  /assert
/rule
works fine, but I want the above to happen ONLY if /data/selected is the
value number.  So if /data/selected is the value text, it will
completely ignore the check to see if the /data/number field is a
numeric value.
Any help would be appreciated.

thanks,
rob
--

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: XMLForm Schematron question

2003-03-26 Thread Rob Johnston
On Wed, 26 Mar 2003, Joerg Heinicke wrote:

 Hello Rob,
 
 you simply must add a predicate to the context:
 
 rule context=/data/number[/data/selected = 'number']
   assert test=number(.)=.
 You must specify a valid number.
   /assert
 /rule

Sweet.  I hadn't even thought about putting a predicate there.  That
worked perfectly.  I appreciate it!

thanks,
rob

 Furthermore I think you should change the test pattern. If someone writes 
 5.0, it can return false. I have in mind 5.0 and 5, if the transformer 
 tests on strings and not on numbers. (I had the same problem a few days ago 
 with XSLT. Is the behaviour simply processor dependent or specified 
 anywhere?) If you change the test to number() = number() you are on the 
 safe side, because NaN = NaN returns always false.
 
 Regards,
 
 Joerg
 
 Rob Johnston wrote:
 Hello -- I have a quick Schematron/XMLForm question.
 
 Let's say I have the following XPath:
 
 /data/selectedwhich can be either text or number
 /data/number  a valid number
 
 I want to write a validation pattern that will assert iff /data/selected
 is 'number' and /data/number must be a number.
 
 For instance:
 
 rule context=/data/number
   assert test=number(.)=.
 You must specify a valid number.
   /assert
 /rule
 
 works fine, but I want the above to happen ONLY if /data/selected is the
 value number.  So if /data/selected is the value text, it will
 completely ignore the check to see if the /data/number field is a
 numeric value.
 
 Any help would be appreciated.
 
 thanks,
 rob
 
 -- 
 
 System Development
 VIRBUS AG
 Fon  +49(0)341-979-7419
 Fax  +49(0)341-979-7409
 [EMAIL PROTECTED]
 www.virbus.de
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

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



RE: XMLForm Schematron question

2003-03-26 Thread Delis, Christopher E.
on a slightly different note, how does one reference another rule context.
i.e.:

let's say i have two elts, /password and /password2:

pattern name=Password Validation Pattern id=password
rule context=/password
assert test=string-length(.) gt; 5Name
should be at least 6 characters./assert
assert test=string-length(.) lt; 60Password
should be less
than 60 characters./assert
/rule
rule context=/password2
assert test=string-length(.) gt; 5Name
should be at least 6 characters./assert
/rule
/pattern

...how can i validate that /password and /password2 are equal in the
rule for /password?  i could use a predicate, but that won't give the user
an error message (from an assert test).  perhaps, this solution is just as
simple (i hope)? =-)  [i'm pretty sure i tried referencing (../password2)
but it didn't seem to work.]


 -Original Message-
 From: Rob Johnston [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 26, 2003 10:35 AM
 To: [EMAIL PROTECTED]
 Subject: Re: XMLForm Schematron question
 
 
 On Wed, 26 Mar 2003, Joerg Heinicke wrote:
 
  Hello Rob,
  
  you simply must add a predicate to the context:
  
  rule context=/data/number[/data/selected = 'number']
assert test=number(.)=.
  You must specify a valid number.
/assert
  /rule
 
 Sweet.  I hadn't even thought about putting a predicate there.  That
 worked perfectly.  I appreciate it!
 
 thanks,
 rob
 
  Furthermore I think you should change the test pattern. If 
 someone writes 
  5.0, it can return false. I have in mind 5.0 and 5, if the 
 transformer 
  tests on strings and not on numbers. (I had the same 
 problem a few days ago 
  with XSLT. Is the behaviour simply processor dependent or specified 
  anywhere?) If you change the test to number() = number() 
 you are on the 
  safe side, because NaN = NaN returns always false.
  
  Regards,
  
  Joerg
  
  Rob Johnston wrote:
  Hello -- I have a quick Schematron/XMLForm question.
  
  Let's say I have the following XPath:
  
  /data/selectedwhich can be either text or number
  /data/number  a valid number
  
  I want to write a validation pattern that will assert iff 
 /data/selected
  is 'number' and /data/number must be a number.
  
  For instance:
  
  rule context=/data/number
assert test=number(.)=.
  You must specify a valid number.
/assert
  /rule
  
  works fine, but I want the above to happen ONLY if 
 /data/selected is the
  value number.  So if /data/selected is the value text, it will
  completely ignore the check to see if the /data/number field is a
  numeric value.
  
  Any help would be appreciated.
  
  thanks,
  rob
  
  -- 
  
  System Development
  VIRBUS AG
  Fon  +49(0)341-979-7419
  Fax  +49(0)341-979-7409
  [EMAIL PROTECTED]
  www.virbus.de
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



Re: XMLForm Schematron question

2003-03-26 Thread Joerg Heinicke
Hi Delis,

for an XML like

root
  passwordmypassword/password
  password2mypassword/password2
/root
I would use the following schematron:

rule context=/root
  assert test=string-length(password)  5must be  5/assert
  assert test=string-length(password) lt; 60must be lt; 60/assert
  assert test=password = password2password != password2/assert
/rule
I didn't test it, but the above looks logical to me ;-) Everything is pure 
XSLT. But what you tried (../password2), should work also (if context is 
password). I guess there must something else wrong. E.g. /password AND 
/password2? How can an XML have two root nodes?

Regards,

Joerg

Delis, Christopher E. wrote:
on a slightly different note, how does one reference another rule context.
i.e.:
let's say i have two elts, /password and /password2:

pattern name=Password Validation Pattern id=password
rule context=/password
assert test=string-length(.) gt; 5Name
should be at least 6 characters./assert
assert test=string-length(.) lt; 60Password
should be less
than 60 characters./assert
/rule
rule context=/password2
assert test=string-length(.) gt; 5Name
should be at least 6 characters./assert
/rule
/pattern
...how can i validate that /password and /password2 are equal in the
rule for /password?  i could use a predicate, but that won't give the user
an error message (from an assert test).  perhaps, this solution is just as
simple (i hope)? =-)  [i'm pretty sure i tried referencing (../password2)
but it didn't seem to work.]
--

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: XMLForm Schematron question

2003-03-26 Thread Delis, Christopher E.
sheesh!  turned out to be a stupid error on my part (i should've posted the
whole xml file and you probably would've found it right away).  thanks for
helping!  here's what works:

?xml version=1.0 ?
schema ns=http://xml.apache.cocoon/xmlform;
xmlns=http://www.ascc.net/xml/schematron;
titleSchema for the Password Form/title
phase id=passwordView
pFor password information./p
active pattern=password/
/phase
pattern name=Password Validation Pattern id=password
rule context=/password
assert test=string-length(.) gt; 3Password
should be at least 4 characters./assert
assert test=string-length(.) lt; 60Password
should be less
than 60 characters./assert
assert
test=string(.)=string(../password2)Passwords do not match!/assert
/rule
rule context=/password2
assert test=string-length(.) gt; 3Password
should be at least 4 characters./assert
/rule
/pattern
/schema


 -Original Message-
 From: Joerg Heinicke [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 26, 2003 10:58 AM
 To: [EMAIL PROTECTED]
 Subject: Re: XMLForm Schematron question
 
 
 Hi Delis,
 
 for an XML like
 
 root
passwordmypassword/password
password2mypassword/password2
 /root
 
 I would use the following schematron:
 
 rule context=/root
assert test=string-length(password)  5must be  5/assert
assert test=string-length(password) lt; 60must be 
 lt; 60/assert
assert test=password = password2password != password2/assert
 /rule
 
 I didn't test it, but the above looks logical to me ;-) 
 Everything is pure 
 XSLT. But what you tried (../password2), should work also (if 
 context is 
 password). I guess there must something else wrong. E.g. 
 /password AND 
 /password2? How can an XML have two root nodes?
 
 Regards,
 
 Joerg
 
 
 Delis, Christopher E. wrote:
  on a slightly different note, how does one reference 
 another rule context.
  i.e.:
  
  let's say i have two elts, /password and /password2:
  
  pattern name=Password Validation Pattern id=password
  rule context=/password
  assert test=string-length(.) gt; 5Name
  should be at least 6 
 characters./assert
  assert test=string-length(.) lt; 
 60Password
  should be less
  than 60 characters./assert
  /rule
  rule context=/password2
  assert test=string-length(.) gt; 5Name
  should be at least 6 
 characters./assert
  /rule
  /pattern
  
  ...how can i validate that /password and /password2 are 
 equal in the
  rule for /password?  i could use a predicate, but that 
 won't give the user
  an error message (from an assert test).  perhaps, this 
 solution is just as
  simple (i hope)? =-)  [i'm pretty sure i tried referencing 
 (../password2)
  but it didn't seem to work.]
 
 -- 
 
 System Development
 VIRBUS AG
 Fon  +49(0)341-979-7419
 Fax  +49(0)341-979-7409
 [EMAIL PROTECTED]
 www.virbus.de
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



RE: XMLForm Schematron question

2003-03-26 Thread Delis, Christopher E.
i take it back!  it still doesn't work =-(

i keep getting Passwords do not match! errors...

 -Original Message-
 From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 26, 2003 11:20 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: XMLForm Schematron question
 
 
 sheesh!  turned out to be a stupid error on my part (i 
 should've posted the
 whole xml file and you probably would've found it right 
 away).  thanks for
 helping!  here's what works:
 
 ?xml version=1.0 ?
 schema ns=http://xml.apache.cocoon/xmlform;
 xmlns=http://www.ascc.net/xml/schematron;
 titleSchema for the Password Form/title
 phase id=passwordView
 pFor password information./p
 active pattern=password/
 /phase
 pattern name=Password Validation Pattern id=password
 rule context=/password
 assert test=string-length(.) gt; 
 3Password
 should be at least 4 
 characters./assert
 assert test=string-length(.) lt; 
 60Password
 should be less
 than 60 characters./assert
 assert
 test=string(.)=string(../password2)Passwords do not match!/assert
 /rule
 rule context=/password2
 assert test=string-length(.) gt; 
 3Password
 should be at least 4 
 characters./assert
 /rule
 /pattern
 /schema
 
 
  -Original Message-
  From: Joerg Heinicke [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, March 26, 2003 10:58 AM
  To: [EMAIL PROTECTED]
  Subject: Re: XMLForm Schematron question
  
  
  Hi Delis,
  
  for an XML like
  
  root
 passwordmypassword/password
 password2mypassword/password2
  /root
  
  I would use the following schematron:
  
  rule context=/root
 assert test=string-length(password)  5must be  5/assert
 assert test=string-length(password) lt; 60must be 
  lt; 60/assert
 assert test=password = password2password != 
 password2/assert
  /rule
  
  I didn't test it, but the above looks logical to me ;-) 
  Everything is pure 
  XSLT. But what you tried (../password2), should work also (if 
  context is 
  password). I guess there must something else wrong. E.g. 
  /password AND 
  /password2? How can an XML have two root nodes?
  
  Regards,
  
  Joerg
  
  
  Delis, Christopher E. wrote:
   on a slightly different note, how does one reference 
  another rule context.
   i.e.:
   
   let's say i have two elts, /password and /password2:
   
   pattern name=Password Validation Pattern id=password
   rule context=/password
   assert test=string-length(.) 
 gt; 5Name
   should be at least 6 
  characters./assert
   assert test=string-length(.) lt; 
  60Password
   should be less
   than 60 characters./assert
   /rule
   rule context=/password2
   assert test=string-length(.) 
 gt; 5Name
   should be at least 6 
  characters./assert
   /rule
   /pattern
   
   ...how can i validate that /password and /password2 are 
  equal in the
   rule for /password?  i could use a predicate, but that 
  won't give the user
   an error message (from an assert test).  perhaps, this 
  solution is just as
   simple (i hope)? =-)  [i'm pretty sure i tried referencing 
  (../password2)
   but it didn't seem to work.]
  
  -- 
  
  System Development
  VIRBUS AG
  Fon  +49(0)341-979-7419
  Fax  +49(0)341-979-7409
  [EMAIL PROTECTED]
  www.virbus.de
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



Re: XMLForm Schematron question

2003-03-26 Thread Joerg Heinicke
Hello Christopher,

I mentioned it already before: I guess the error are /password and 
/password2 as the values of the context attributes of the rule 
element. I have never been using Schematron in Cocoon, but as I used it 
offline a stylesheet was created from this schematron XML description 
and the rule's contexts were used in the match attribute of 
xsl:template/. The problem is then, that you need two root elements, 
to get true out of your test. But that's not possible in XML. So I 
guessed that you must change /password to password (the same for 
password2).

Regards,

Joerg

Delis, Christopher E. wrote:
i take it back!  it still doesn't work =-(

i keep getting Passwords do not match! errors...


-Original Message-
From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 11:20 AM
To: '[EMAIL PROTECTED]'
Subject: RE: XMLForm Schematron question
sheesh!  turned out to be a stupid error on my part (i 
should've posted the
whole xml file and you probably would've found it right 
away).  thanks for
helping!  here's what works:

?xml version=1.0 ?
schema ns=http://xml.apache.cocoon/xmlform;
   xmlns=http://www.ascc.net/xml/schematron;
   titleSchema for the Password Form/title
   phase id=passwordView
   pFor password information./p
   active pattern=password/
   /phase
   pattern name=Password Validation Pattern id=password
   rule context=/password
   assert test=string-length(.) gt; 
3Password
   should be at least 4 
characters./assert
   assert test=string-length(.) lt; 
60Password
should be less
   than 60 characters./assert
   assert
test=string(.)=string(../password2)Passwords do not match!/assert
   /rule
   rule context=/password2
   assert test=string-length(.) gt; 
3Password
   should be at least 4 
characters./assert
   /rule
   /pattern
/schema


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


RE: XMLForm Schematron question

2003-03-26 Thread Delis, Christopher E.
i'm not sure i understand your explanation.  are you suggesting that i need
to create another root container (e.g., /root) to hold the password and
password2 nodes in order to reference other form objects?  that doesn't seem
right.  or, are you saying that if change /password to password and
/password2 to password2 in my assert, that it should work (i tried this,
but it didn't work)?

i could try creating another root to contain the password nodes, but then
i'd have to change the model (bean), too.  since my deadline for this
project isn't yesterday, i was hoping somebody out there has actually done
something similar to this in cocoon and was willing to share...  btw, i am
using cocoon 2.1 cvs snapshot (xml-cocoon-2.1-20030210233231.tar.gz).

TIA,

chris



 -Original Message-
 From: Joerg Heinicke [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 26, 2003 1:51 PM
 To: [EMAIL PROTECTED]
 Subject: Re: XMLForm Schematron question
 
 
 Hello Christopher,
 
 I mentioned it already before: I guess the error are /password and 
 /password2 as the values of the context attributes of the rule 
 element. I have never been using Schematron in Cocoon, but as 
 I used it 
 offline a stylesheet was created from this schematron XML description 
 and the rule's contexts were used in the match attribute of 
 xsl:template/. The problem is then, that you need two root 
 elements, 
 to get true out of your test. But that's not possible in XML. So I 
 guessed that you must change /password to password (the same for 
 password2).
 
 Regards,
 
 Joerg
 
 
 Delis, Christopher E. wrote:
  i take it back!  it still doesn't work =-(
  
  i keep getting Passwords do not match! errors...
  
  
 -Original Message-
 From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 26, 2003 11:20 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: XMLForm Schematron question
 
 
 sheesh!  turned out to be a stupid error on my part (i 
 should've posted the
 whole xml file and you probably would've found it right 
 away).  thanks for
 helping!  here's what works:
 
 ?xml version=1.0 ?
 schema ns=http://xml.apache.cocoon/xmlform;
 xmlns=http://www.ascc.net/xml/schematron;
 titleSchema for the Password Form/title
 phase id=passwordView
 pFor password information./p
 active pattern=password/
 /phase
 pattern name=Password Validation Pattern id=password
 rule context=/password
 assert test=string-length(.) gt; 
 3Password
 should be at least 4 
 characters./assert
 assert test=string-length(.) lt; 
 60Password
 should be less
 than 60 characters./assert
 assert
 test=string(.)=string(../password2)Passwords do not 
 match!/assert
 /rule
 rule context=/password2
 assert test=string-length(.) gt; 
 3Password
 should be at least 4 
 characters./assert
 /rule
 /pattern
 /schema
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



Re: XMLForm Schematron question

2003-03-26 Thread Joerg Heinicke
Delis, Christopher E. wrote:
i'm not sure i understand your explanation.  are you suggesting that i need
to create another root container (e.g., /root) to hold the password and
password2 nodes in order to reference other form objects?  that doesn't seem
right.  or, are you saying that if change /password to password and
/password2 to password2 in my assert, that it should work (i tried this,
but it didn't work)?
Yes, I meant the second one. On what XML are these XPaths evaluated? Or 
is it JXPath on objects? Then I guess somebody else must help. Because I 
don't know the according XML structure for the objects.

You can try to write a mail to Ivelin 
(http://wiki.cocoondev.org/Wiki.jsp?page=IvelinIvanov), who is the 
XForms guru. Or more general to the cocoon dev list.

Joerg

i could try creating another root to contain the password nodes, but then
i'd have to change the model (bean), too.  since my deadline for this
project isn't yesterday, i was hoping somebody out there has actually done
something similar to this in cocoon and was willing to share...  btw, i am
using cocoon 2.1 cvs snapshot (xml-cocoon-2.1-20030210233231.tar.gz).
TIA,

chris

-Original Message-
From: Joerg Heinicke [mailto:[EMAIL PROTECTED]
Hello Christopher,

I mentioned it already before: I guess the error are /password and 
/password2 as the values of the context attributes of the rule 
element. I have never been using Schematron in Cocoon, but as 
I used it 
offline a stylesheet was created from this schematron XML description 
and the rule's contexts were used in the match attribute of 
xsl:template/. The problem is then, that you need two root 
elements, 
to get true out of your test. But that's not possible in XML. So I 
guessed that you must change /password to password (the same for 
password2).

Regards,

Joerg

Delis, Christopher E. wrote:

i take it back!  it still doesn't work =-(

i keep getting Passwords do not match! errors...



-Original Message-
From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
sheesh!  turned out to be a stupid error on my part (i 
should've posted the
whole xml file and you probably would've found it right 
away).  thanks for
helping!  here's what works:

?xml version=1.0 ?
schema ns=http://xml.apache.cocoon/xmlform;
  xmlns=http://www.ascc.net/xml/schematron;
  titleSchema for the Password Form/title
  phase id=passwordView
  pFor password information./p
  active pattern=password/
  /phase
  pattern name=Password Validation Pattern id=password
  rule context=/password
  assert test=string-length(.) gt; 
3Password
  should be at least 4 
characters./assert
  assert test=string-length(.) lt; 
60Password
should be less
  than 60 characters./assert
  assert
test=string(.)=string(../password2)Passwords do not 
match!/assert

  /rule
  rule context=/password2
  assert test=string-length(.) gt; 
3Password
  should be at least 4 
characters./assert
  /rule
  /pattern
/schema


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


Re: XMLForm Schematron question

2003-03-26 Thread Ugo Cei
Delis, Christopher E. wrote:
i take it back!  it still doesn't work =-(

i keep getting Passwords do not match! errors...
I'm currently using the following:

rule context=/
  assert test=string(password1) = string(password2)
Passwords do not match.
  /assert
/rule
--
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: sql transformer question; *not* esql... (was RE: ???ESQL upda te table???)

2003-03-18 Thread Delis, Christopher E.
actually, now that i return back to my problem... i am not so embarassed (at
least not yet!)...

this solution doesn't appear to solve my problem because my stylesheet is in
the middle of a pipeline and the substitute values are not easily attainable
from within the sitemap.  also, i do not wish to have to declare each
variable more times than i have to (another reason i don't want it in the
sitemap).  has anyone else run into a similar situation?  of course, i could
write (i'd rather find one already developed ;-) another transform to
strip offending characters (such as single-quotes) for each variable but i'd
rather not.  any ideas?  do i need to re-design my approach?

here is the update command i wish to perform.  it receives the variables
from previous generator/transforms:

?xml version=1.0?

sql:execute-query xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:sql=http://apache.org/cocoon/SQL/2.0;
   sql:use-connectionidal/sql:use-connection
   sql:query
update contact
set last_name = 'xsl:value-of
select=/library/contact/last_name/',
first_name = 'xsl:value-of
select=/library/contact/first_name/',
email = 'xsl:value-of select=/library/contact/email/',
phone = 'xsl:value-of select=/library/contact/phone/',
address = 'xsl:value-of select=/library/contact/address/',
city = 'xsl:value-of select=/library/contact/city/',
zip = 'xsl:value-of select=/library/contact/zip/'
where library_id = xsl:value-of select=/library/id/
   /sql:query
/sql:execute-query




 -Original Message-
 From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 18, 2003 4:08 AM
 To: 'Luca Morandini '; '[EMAIL PROTECTED] '
 Subject: RE: sql transformer question; *not* esql... (was RE: ???ESQL
 upda te table???)
 
 
  thanks!  i am so embarassed. ;-)  i gazed right past that little
 paragraph...  sheesh!
 
 -Original Message-
 From: Luca Morandini
 To: [EMAIL PROTECTED]
 Sent: 3/18/03 1:15 AM
 Subject: RE: sql transformer question; *not* esql... (was RE: 
 ???ESQL update
 table???)
 
 Christopher,
 
 IIUC, you need substitution: go to
 http://xml.apache.org/cocoon/userdocs/transformers/sql-transfo
 rmer.html
 and look for the
 Substitution topic
 
 Regards,
 
 -
Luca Morandini
GIS Consultant
   [EMAIL PROTECTED]
 http://utenti.tripod.it/lmorandini/index.html
 -
 
 
  -Original Message-
  From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, March 18, 2003 1:53 AM
  To: Delis, Christopher E.; ''[EMAIL PROTECTED]' '
  Subject: sql transformer question; *not* esql... (was RE: ???ESQL
 update
  table???)
 
 
  i replied to the wrong topic.  sorry...  what i meant to 
 ask was:  is
 there
  a place-holder mechanism available using the sql transformer?
 --chris
 
  -Original Message-
  From: Delis, Christopher E.
  To: '[EMAIL PROTECTED]'
  Sent: 3/17/03 9:48 AM
  Subject: RE: ???ESQL update table???
 
  on a slightly different note, is there place-holder 
 functionality in
  esql
  stylesheet language?  e.g.,
 
  insert into atable (field1, field2) values (?, ?)
  select * from atable where field1 = ? limit ?
  ...
 
  TIA,
  chris
 
 
   -Original Message-
   From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
   Sent: Friday, March 14, 2003 9:20 AM
   To: [EMAIL PROTECTED]
   Subject: ???ESQL update table???
  
  
   Hi,
   This is a part of a query. My problem is that when I make a
   SELECT right
   after an INSERT I don't get the last updated query :
  
   ---
   esql:execute-query
esql:query
 INSERT INTO Actions  (at_name, at_order)
 VALUES ('esql:get-string column=at_name ancestor=1/',
   xsp:exprnouvOrder/xsp:expr)
/esql:query
esql:update-results/
   /esql:execute-query
  
   esql:execute-query
esql:query
 SELECT TOP xsp:exprmyTopCnt/xsp:expr * FROM Actions
 WHERE at_order = xsp:exprmyOrderID/xsp:expr
 ORDER BY at_id DESC
/esql:query
esql:results
esql:row-results
 xsp:logic
   nouvActionName = esql:get-string column=at_name/;
 /xsp:logic
/esql:row-results
/esql:results
   /esql:execute-query
  
   esql:execute-query
esql:query
 SELECT TOP 1 * FROM Actions
 WHERE at_name = 'xsp:exprnouvActionName/xsp:expr'
 ORDER BY at_id DESC
/esql:query
esql:results
esql:row-results
  xsp:logic
   nouvAction = esql:get-int column=at_order/;
  /xsp:logic
 /esql:row-results
/esql:results
   /esql:execute-query
   ---
   What I mean is that in the last execute-query the value
   esql:get-int
   column=at_order/ returns a value, but in my SQL 
 Profiler I get a
   query witch returns another value (the right)
   I think that it is due to the refreshing from the insert

RE: sql transformer question; *not* esql... (was RE: ???ESQL upda te table???)

2003-03-18 Thread Luca Morandini
 -Original Message-
 From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 18, 2003 5:18 PM
 To: '[EMAIL PROTECTED]'; 'Luca Morandini '
 Subject: RE: sql transformer question; *not* esql... (was RE: ???ESQL
 upda te table???)

 sitemap).  has anyone else run into a similar situation?  of course, i could
 write (i'd rather find one already developed ;-) another transform to
 strip offending characters (such as single-quotes) for each variable but i'd
 rather not.  any ideas?  do i need to re-design my approach?

I convert ìnput data using an XSL template: slow but portable.

An XSL extension function would do the trick faster, I presume hmmm

Regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-




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



RE: sql transformer question; *not* esql... (was RE: ???ESQL upda te table???)

2003-03-18 Thread Delis, Christopher E.
do you mind sharing the template? =-)  --chris

 -Original Message-
 From: Luca Morandini [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 18, 2003 11:18 AM
 To: [EMAIL PROTECTED]
 Subject: RE: sql transformer question; *not* esql... (was RE: ???ESQL
 upda te table???)
 
 
  -Original Message-
  From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, March 18, 2003 5:18 PM
  To: '[EMAIL PROTECTED]'; 'Luca Morandini '
  Subject: RE: sql transformer question; *not* esql... (was 
 RE: ???ESQL
  upda te table???)
 
  sitemap).  has anyone else run into a similar situation?  
 of course, i could
  write (i'd rather find one already developed ;-) another 
 transform to
  strip offending characters (such as single-quotes) for each 
 variable but i'd
  rather not.  any ideas?  do i need to re-design my approach?
 
 I convert ìnput data using an XSL template: slow but portable.
 
 An XSL extension function would do the trick faster, I 
 presume hmmm
 
 Regards,
 
 -
Luca Morandini
GIS Consultant
   [EMAIL PROTECTED]
 http://utenti.tripod.it/lmorandini/index.html
 -
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



RE: sql transformer question; *not* esql... (was RE: ???ESQL upda te table???)

2003-03-18 Thread Luca Morandini
 -Original Message-
 From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 18, 2003 6:32 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: sql transformer question; *not* esql... (was RE: ???ESQL
 upda te table???)
 
 
 do you mind sharing the template? =-)  --chris

not at all (mind, it just converts single quotes in double-single quotes).

xsl:template name=escape-apos
xsl:param name=string /

xsl:choose

xsl:when test='contains($string, apos;)'

xsl:value-of select='substring-before($string, apos;)' /
xsl:text''/xsl:text

xsl:call-template name=escape-apos
xsl:with-param name=string select='substring-after($string, 
apos;)' /
/xsl:call-template

/xsl:when

xsl:otherwise
xsl:value-of select=$string /
/xsl:otherwise

/xsl:choose

/xsl:template

Regards,

- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 


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



sql transformer question; *not* esql... (was RE: ???ESQL update table???)

2003-03-17 Thread Delis, Christopher E.
i replied to the wrong topic.  sorry...  what i meant to ask was:  is there
a place-holder mechanism available using the sql transformer?   --chris 

-Original Message-
From: Delis, Christopher E.
To: '[EMAIL PROTECTED]'
Sent: 3/17/03 9:48 AM
Subject: RE: ???ESQL update table???

on a slightly different note, is there place-holder functionality in
esql
stylesheet language?  e.g.,

insert into atable (field1, field2) values (?, ?)
select * from atable where field1 = ? limit ?
...

TIA, 
chris


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 14, 2003 9:20 AM
 To: [EMAIL PROTECTED]
 Subject: ???ESQL update table???
 
 
 Hi,
 This is a part of a query. My problem is that when I make a 
 SELECT right
 after an INSERT I don't get the last updated query :
 
 ---
 esql:execute-query
  esql:query
   INSERT INTO Actions  (at_name, at_order)
   VALUES ('esql:get-string column=at_name ancestor=1/',
 xsp:exprnouvOrder/xsp:expr)
  /esql:query
  esql:update-results/
 /esql:execute-query  
 
 esql:execute-query
  esql:query
   SELECT TOP xsp:exprmyTopCnt/xsp:expr * FROM Actions
   WHERE at_order = xsp:exprmyOrderID/xsp:expr
   ORDER BY at_id DESC 
  /esql:query
  esql:results
  esql:row-results   
   xsp:logic
 nouvActionName = esql:get-string column=at_name/;
   /xsp:logic  
  /esql:row-results
  /esql:results   
 /esql:execute-query  
 
 esql:execute-query
  esql:query
   SELECT TOP 1 * FROM Actions
   WHERE at_name = 'xsp:exprnouvActionName/xsp:expr'
   ORDER BY at_id DESC  
  /esql:query 
  esql:results
  esql:row-results
xsp:logic
 nouvAction = esql:get-int column=at_order/;
/xsp:logic 
   /esql:row-results
  /esql:results
 /esql:execute-query   
 ---
 What I mean is that in the last execute-query the value 
 esql:get-int
 column=at_order/ returns a value, but in my SQL Profiler I get a
 query witch returns another value (the right)
 I think that it is due to the refreshing from the insert, because the
 insert value is queried!
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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

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



RE: sql transformer question; *not* esql... (was RE: ???ESQL update table???)

2003-03-17 Thread Luca Morandini
Christopher,

IIUC, you need substitution: go to 
http://xml.apache.org/cocoon/userdocs/transformers/sql-transformer.html and look for 
the
Substitution topic

Regards,

-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-


 -Original Message-
 From: Delis, Christopher E. [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 18, 2003 1:53 AM
 To: Delis, Christopher E.; ''[EMAIL PROTECTED]' '
 Subject: sql transformer question; *not* esql... (was RE: ???ESQL update
 table???)


 i replied to the wrong topic.  sorry...  what i meant to ask was:  is there
 a place-holder mechanism available using the sql transformer?   --chris

 -Original Message-
 From: Delis, Christopher E.
 To: '[EMAIL PROTECTED]'
 Sent: 3/17/03 9:48 AM
 Subject: RE: ???ESQL update table???

 on a slightly different note, is there place-holder functionality in
 esql
 stylesheet language?  e.g.,

 insert into atable (field1, field2) values (?, ?)
 select * from atable where field1 = ? limit ?
 ...

 TIA,
 chris


  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 14, 2003 9:20 AM
  To: [EMAIL PROTECTED]
  Subject: ???ESQL update table???
 
 
  Hi,
  This is a part of a query. My problem is that when I make a
  SELECT right
  after an INSERT I don't get the last updated query :
 
  ---
  esql:execute-query
   esql:query
INSERT INTO Actions  (at_name, at_order)
VALUES ('esql:get-string column=at_name ancestor=1/',
  xsp:exprnouvOrder/xsp:expr)
   /esql:query
   esql:update-results/
  /esql:execute-query
 
  esql:execute-query
   esql:query
SELECT TOP xsp:exprmyTopCnt/xsp:expr * FROM Actions
WHERE at_order = xsp:exprmyOrderID/xsp:expr
ORDER BY at_id DESC
   /esql:query
   esql:results
   esql:row-results
xsp:logic
  nouvActionName = esql:get-string column=at_name/;
/xsp:logic
   /esql:row-results
   /esql:results
  /esql:execute-query
 
  esql:execute-query
   esql:query
SELECT TOP 1 * FROM Actions
WHERE at_name = 'xsp:exprnouvActionName/xsp:expr'
ORDER BY at_id DESC
   /esql:query
   esql:results
   esql:row-results
 xsp:logic
  nouvAction = esql:get-int column=at_order/;
 /xsp:logic
/esql:row-results
   /esql:results
  /esql:execute-query
  ---
  What I mean is that in the last execute-query the value
  esql:get-int
  column=at_order/ returns a value, but in my SQL Profiler I get a
  query witch returns another value (the right)
  I think that it is due to the refreshing from the insert, because the
  insert value is queried!
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

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

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



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



SQLTransformer stored procedure question

2003-03-11 Thread Irv Salisbury III
I call an existing stored procedure with:

   sql:execute-query
   sql:query isstoredprocedure=true
   begin qChange.R_IMS_CHANGE( 'ALZHEIMERS', '1999 Q3', 
'NRX', ?); end;
   /sql:query
   sql:out-parameter sql:nr=1 sql:name=resultset 
sql:type=oracle.jdbc.driver.OracleTypes.CURSOR/
   /sql:execute-query

However, I get an ORA-08103: object no longer exists error at 
SQLTransformer:1250.  This line looks like it is simply calling 
getObject on the CallableStatement.  Any reason why I might be getting 
this ?

Thanks,

Irv



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


RE: SQLTransformer stored procedure question

2003-03-11 Thread Luca Morandini
 -Original Message-
 From: Irv Salisbury III [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 11, 2003 6:38 PM
 To: [EMAIL PROTECTED]
 Subject: SQLTransformer stored procedure question

 I call an existing stored procedure with:
 
 sql:execute-query
 sql:query isstoredprocedure=true
 begin qChange.R_IMS_CHANGE( 'ALZHEIMERS', '1999 Q3', 
 'NRX', ?); end;
 /sql:query
 sql:out-parameter sql:nr=1 sql:name=resultset 
 sql:type=oracle.jdbc.driver.OracleTypes.CURSOR/
 /sql:execute-query
 
 However, I get an ORA-08103: object no longer exists error at 
 SQLTransformer:1250.  This line looks like it is simply calling 
 getObject on the CallableStatement.  Any reason why I might be getting 
 this ?

Irv,

the syntax is correct... it could be a JDBC driver problem... hmmm... 
Could you try the same statement using Java instead of Cocoon ?

Regards,

P.S.
You're absolutely sure that SP, with those parameters' values, returns a valid cursor, 
aren't you ?

- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 



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



Xindice question

2003-03-11 Thread Irv Salisbury III
I thought I had followed the directions at cocooncenter for setting up 
xindice on my box with cocoon, but I am getting:

org.xmldb.api.base.XMLDBException: Collection No IndexManager

   at 
org.apache.cocoon.components.source.XMLDBSource.resourceToSAX(XMLDBSource.java:215)

   at 
org.apache.cocoon.components.source.XMLDBSource.toSAX(XMLDBSource.java:175)

   at 
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)

This is really stumping me.  I am currently running with JDK1.4 and 
Cocoon 2.0.4.

What is this IndexManager, and why isn't mine working ;-)

Irv



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


Re: Xindice question

2003-03-11 Thread Irv Salisbury III
Just solved my own problem.  Turns out I simply needed to add a trailing 
slash to my xmldb URL string.  You'd think that this would be a pretty 
common problem.

Irv

Irv Salisbury III wrote:

I thought I had followed the directions at cocooncenter for setting up 
xindice on my box with cocoon, but I am getting:

org.xmldb.api.base.XMLDBException: Collection No IndexManager

   at 
org.apache.cocoon.components.source.XMLDBSource.resourceToSAX(XMLDBSource.java:215) 

   at 
org.apache.cocoon.components.source.XMLDBSource.toSAX(XMLDBSource.java:175) 

   at 
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143) 

This is really stumping me.  I am currently running with JDK1.4 and 
Cocoon 2.0.4.

What is this IndexManager, and why isn't mine working ;-)

Irv



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




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


Question

2003-03-03 Thread Alejandro Raiczyk
Is there any way to detect when a user closes the browser and that session
is destroyed ?
There was a way under C1 using SessionListener, but I can't find an
implementation or something like that under C2.

Thanks in advance.

Alejandro


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



Re: Question

2003-03-03 Thread Leszek Gawron
On pon, mar 03, 2003 at 05:31:17 -0300, Alejandro Raiczyk wrote:
 Is there any way to detect when a user closes the browser and that session
 is destroyed ?
 There was a way under C1 using SessionListener, but I can't find an
 implementation or something like that under C2.
It is not possible to detect browser closing but it's possible to capture
session timeout event
see http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=104609991021185w=2
ouzo

-- 
__
 | /  \ |Leszek Gawron//  \\
\_\\  //_/  [EMAIL PROTECTED]  _\\()//_
 .'/()\'. Phone: +48(600)341118 / //  \\ \
  \\  //  recursive: adj; see recursive  | \__/ |


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



RE: Question on generators...

2003-03-03 Thread SriKumar Kareti
Geoff,

Thanks. Got it working with minimal effort.

Kumar.

-Original Message-
From: Geoff Howard [mailto:[EMAIL PROTECTED]
Sent: Friday, January 31, 2003 9:48 PM
To: [EMAIL PROTECTED]
Subject: RE: Question on generators...


Then yes, you can reuse it - but you should be aware that it's not very
optimized doing xml generation through string.  If you're doing short
documents, you may not notice any issue.  But if you have a larger
document
you may wish to reimplement in SAX.  Try it first as is - you may be
perfectly satisfied.

The short answer about how is basically:
1) Make sure you read up on Generators, including the tutorial on
CustomGenerators if you haven't already.  Also read up on Avalon (the
stuff
at in the Cocoon docs should be enough).
2) Create a generator that imports your original class, and populate a
String in your Generator by calling appropriate methods in your class.
Exactly how is 100% determined by the specifics of how it works now, but
I
trust you can figure that part out.

I have to gloss over the next details I think until I know what version
you're using:
3) Lookup the parser from Cocoon's ComponentManager (which means your
Generator needs to extend ComposerGenerator, or implement Composable
itself).
4) Do InputSource inputSource = new InputSource(new StringReader(
yourXMLString ));
5) Pass that inputSource to parse();

What version of Cocoon are you using? 2.0.3, 2.0.4, or 2.1dev?

If you're using 2.1dev, check out WebServiceProxyGenerator (quick before
someone refactors it to not use String anymore).  It does almost exactly
what you want, except it gets the String over HTTP from any arbitrary
url.
In fact, you may look into that as a quick option.  Don't know your
current
setup, but if you can call the servlet and get xml string back via HTTP
you
could be finished quite quickly.

HTH,
Geoff Howard

 -Original Message-
 From: SriKumar Kareti [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 31, 2003 2:08 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Question on generators...



 Geoff,

 I was creating String...

 thx...

 -Original Message-
 From: Geoff Howard [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 31, 2003 12:28 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Question on generators...


 This all depends on what you were doing in your class.  Were you
 creating
 xml?  If so, DOM, SAX or String?

 Geoff

  -Original Message-
  From: SriKumar Kareti [mailto:[EMAIL PROTECTED]
  Sent: Friday, January 31, 2003 10:21 AM
  To: [EMAIL PROTECTED]
  Subject: Question on generators...
 
 
 
  Thanks for you help in advance...
 
  I am a new user to Cocoon. I have searched the site pretty well and
  could
  not answer this question. Could someone help...
 
  My goal is to move from current servlet based solution to Cocoon.
The
  general
  flow of my current program is
 
  1) Take the request,
  2) Generate the XML by making calls to Database based on the
 parameters
 passed...
  3) Use XSLT to generate html which is returned...
 
  Now I'd like to move to cocoon. I want to use my existing Java class
  as the generator in Cocoon.
 
  Can I do that?
 
  SriKumar.
 
 
-
  Please check that your question  has not already been answered in
the
  FAQ before posting.
http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail:
[EMAIL PROTECTED]
  For additional commands, e-mail:
[EMAIL PROTECTED]
 
 
 


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


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



Is this question too simple to be answered ?

2003-02-20 Thread Laurent Comte
Hi,

is this question too simple to be answered ?

-Message d'origine-
De : Laurent Comte [mailto:[EMAIL PROTECTED]]
Envoy : mercredi 19 fvrier 2003 13:25
A : [EMAIL PROTECTED]
Objet : Simple pb with subsitemap mount



Hi,

I just try to create subsitemap as written in docs.

I have :

[sitemap.xmap]
...
  map:pipelines
!-- very simple test --
map:pipeline
map:match pattern=view/**
map:mount uri-prefix=view check-reload=true
src=file:///D:\work\web.xmap /
/map:match
/map:pipeline
  /map:pipelines
...


[D:\work\web.xmap]
...
map:pipelines
map:pipeline
  map:match pattern=**/index.xml
map:generate src=index.xml/
map:transform src=index.xsl/
map:serialize/
  /map:match
/map:pipeline
  /map:pipelines
...


So, when I type http://localhost:8080/cocon/view/index.xml, i've got this
beautiful thing :



description org.apache.cocoon.ProcessingException: Exception during
processing of file:/D:/index.xsl: java.io.FileNotFoundException: \index.xsl
(The system cannot find the file specified)

sender org.apache.cocoon.servlet.ParanoidCocoonServlet

source Cocoon servlet

stack-trace

org.apache.cocoon.ProcessingException: Exception during processing of
file:/D:/index.xsl: java.io.FileNotFoundException: \index.xsl (The system
cannot find the file specified)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:211)
at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:268)
at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:239)
at
org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:
298)
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab
stractEventPipeline.java:215)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEven
tPipeline.java:278)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(Cachi
ngEventPipeline.java:141)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:317)
at
org.apache.cocoon.www.file_.D_.work.web_xmap.matchN10224(D:\Java\Oodrive\Tom
cat\work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1530
)
at
org.apache.cocoon.www.file_.D_.work.web_xmap.process(D:\Java\Oodrive\Tomcat\
work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1439)
at
org.apache.cocoon.www.file_.D_.work.web_xmap.process(D:\Java\Oodrive\Tomcat\
work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1385)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.www.sitemap_xmap.matchN1020C(D:\Java\Oodrive\Tomcat\work\c
ocoon-files\org/apache/cocoon/www\sitemap_xmap.java:1447)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\Java\Oodrive\Tomcat\work\cocoo
n-files\org/apache/cocoon/www\sitemap_xmap.java:1394)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\Java\Oodrive\Tomcat\work\cocoo
n-files\org/apache/cocoon/www\sitemap_xmap.java:1340)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline

Re: Is this question too simple to be answered ?

2003-02-20 Thread Lionel Crine
here is what I did  :

In the main sitemap :
!-- === mount sub sitemap 
=== --
map:pipeline
  map:match pattern=request/*
map:mount uri-prefix=request check-reload=true 
src=demo/sitemap.xmap method-reload=synchron/
  /map:match
/map:pipeline
!-- == --

In the subsitemap :

map:match pattern=request
  map:generate type=serverpages src=request.xsp/
  map:transform type=xslt src=request.xsl/--
  map:transform type=xslt src=documents.xsl/
  map:serialize type=html/
/map:match

Try relative location for your files.



Hope this help


At 10:27 20/02/2003 +0100, you wrote:
Hi,

is this question too simple to be answered ?

-Message d'origine-
De : Laurent Comte [mailto:[EMAIL PROTECTED]]
Envoyé : mercredi 19 février 2003 13:25
A : [EMAIL PROTECTED]
Objet : Simple pb with subsitemap mount



Hi,

I just try to create subsitemap as written in docs.

I have :

[sitemap.xmap]
...
  map:pipelines
!-- very simple test --
map:pipeline
map:match pattern=view/**
map:mount uri-prefix=view check-reload=true
src=file:///D:\work\web.xmap /
/map:match
/map:pipeline
  /map:pipelines
...


[D:\work\web.xmap]
...
map:pipelines
map:pipeline
  map:match pattern=**/index.xml
map:generate src=index.xml/
map:transform src=index.xsl/
map:serialize/
  /map:match
/map:pipeline
  /map:pipelines
...


So, when I type http://localhost:8080/cocon/view/index.xml, i've got this
beautiful thing :



description org.apache.cocoon.ProcessingException: Exception during
processing of file:/D:/index.xsl: java.io.FileNotFoundException: \index.xsl
(The system cannot find the file specified)

sender org.apache.cocoon.servlet.ParanoidCocoonServlet

source Cocoon servlet

stack-trace

org.apache.cocoon.ProcessingException: Exception during processing of
file:/D:/index.xsl: java.io.FileNotFoundException: \index.xsl (The system
cannot find the file specified)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:211)
at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:268)
at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:239)
at
org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:
298)
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab
stractEventPipeline.java:215)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEven
tPipeline.java:278)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(Cachi
ngEventPipeline.java:141)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:317)
at
org.apache.cocoon.www.file_.D_.work.web_xmap.matchN10224(D:\Java\Oodrive\Tom
cat\work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1530
)
at
org.apache.cocoon.www.file_.D_.work.web_xmap.process(D:\Java\Oodrive\Tomcat\
work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1439)
at
org.apache.cocoon.www.file_.D_.work.web_xmap.process(D:\Java\Oodrive\Tomcat\
work\cocoon-files\org/apache/cocoon/www/file_/D_/work\web_xmap.java:1385)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.www.sitemap_xmap.matchN1020C(D:\Java\Oodrive\Tomcat\work\c
ocoon-files\org/apache/cocoon/www\sitemap_xmap.java:1447)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\Java\Oodrive\Tomcat\work\cocoo
n-files\org/apache/cocoon/www\sitemap_xmap.java:1394)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\Java\Oodrive\Tomcat\work\cocoo
n-files\org/apache/cocoon/www\sitemap_xmap.java:1340)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at 
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke

RE: Is this question too simple to be answered ?

2003-02-20 Thread Laurent Comte
Hi, and thanks for your reply :)

quote
Try relative location for your files.
/quote

The problem is that my subsitemap is not located in a subfolder
under the main sitemap. So I must specify as src something like
../../../Apache/htdocs/myFolder/itsHere. Humf!

== BUT, finally I found 2 interesting things :

1/ Even in Windows, if I specify the path as file:///D:/work/web.xmap
   instead file:///D:\work\web.xmap, it works ! Not really logic.

2/ When I change something in the main sitemap without updating the
subsitemap
   file, it fails ! I must make a fake modification in the subsitemap file
to
   make things working ...


A little bit confusing, isn't it ?

BTW, do you have the same behaviours (I use 2.0.4) ???

Laurent.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: Is this question too simple to be answered ?

2003-02-20 Thread Derek Hohls



Not sure about (1) - as I have not done this before,
but for (2) look at the documnentation for the
reload-method="synchron" attribute/value.

(example under:
http://wiki.cocoondev.org/Wiki.jsp?page=BeginnerSWTutorial_01
and
http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html
 - in the section 'Reloading'_

 [EMAIL PROTECTED] 20/02/2003 12:23:23 Hi, 
and thanks for your reply :)quoteTry relative location for 
your files./quoteThe problem is that my subsitemap is not 
located in a subfolderunder the main sitemap. So I must specify as "src" 
something like"../../../Apache/htdocs/myFolder/itsHere". Humf!== 
BUT, finally I found 2 interesting things :1/ Even in Windows, if I 
specify the path as "file:///D:/work/web.xmap" instead 
"file:///D:\work\web.xmap", it works ! Not really logic.2/ When I change 
something in the main sitemap without updating thesubsitemap 
file, it fails ! I must make a "fake" modification in the subsitemap 
fileto make things working ...A little bit 
confusing, isn't it ?BTW, do you have the same behaviours (I use 2.0.4) 
???Laurent.-Please 
check that your question has not already been answered in theFAQ 
before posting. http://xml.apache.org/cocoon/faq/index.htmlTo 
unsubscribe, e-mail: 
[EMAIL PROTECTED]For additional commands, 
e-mail: 
[EMAIL PROTECTED]-- 
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

"The CSIR exercises no editorial control over E-mail messages and/or
attachments thereto/links referred to therein originating in the
organisation and the views in this message/attachments thereto are
therefore not necessarily those of the CSIR and/or its employees.
The sender of this e-mail is, moreover, in terms of the CSIR's Conditions
of Service, subject to compliance with the CSIR's internal E-mail and
Internet Policy."



RE: Is this question too simple to be answered ?

2003-02-20 Thread Lionel Crine
i''m using cocoon 2.0.4 and tomcat 3.3.1. I didn't encounter this trouble.
It's working fine for me.
If your subsitemap is not reloaded you should look at te different option 
in map:mount ...




At 11:23 20/02/2003 +0100, you wrote:
Hi, and thanks for your reply :)

quote
Try relative location for your files.
/quote

The problem is that my subsitemap is not located in a subfolder
under the main sitemap. So I must specify as src something like
../../../Apache/htdocs/myFolder/itsHere. Humf!

== BUT, finally I found 2 interesting things :

1/ Even in Windows, if I specify the path as file:///D:/work/web.xmap
   instead file:///D:\work\web.xmap, it works ! Not really logic.

2/ When I change something in the main sitemap without updating the
subsitemap
   file, it fails ! I must make a fake modification in the subsitemap file
to
   make things working ...


A little bit confusing, isn't it ?

BTW, do you have the same behaviours (I use 2.0.4) ???

Laurent.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: Is this question too simple to be answered ?

2003-02-20 Thread Laurent Comte




Yes, I read it already.

So I have check-reload="yes"and 
reload-method="synchron",
BUT the problem is :

If I update the main sitemap file without 
updating the subsitemap file,
I obtain a NullPointerException during 
parsing of the subsitemap file.

If I make a fake update in the subsitemap 
file, it works.

Even If I make a fake update in the MAIN 
sitemap file, I've got the Exception.


Regards.
Laurent



===
but for (2) look at the documnentation for the

  reload-method="synchron" attribute/value.
  
  (example under:
  http://wiki.cocoondev.org/Wiki.jsp?page=BeginnerSWTutorial_01
  and
  http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html
   - in the section 'Reloading'_
  


RE: Is this question too simple to be answered ?

2003-02-20 Thread Derek Hohls



Null Pointer exceptions are my worst ;-( but often
the root problem is a simple one - it sounds like
something is wrong with the subsitemap 
[EMAIL PROTECTED] 20/02/2003 01:07:19 

Yes, I read it already.

So I have check-reload="yes"and 
reload-method="synchron",
BUT the problem is :

If I update the main sitemap file without 
updating the subsitemap file,
I obtain a NullPointerException during 
parsing of the subsitemap file.

If I make a fake update in the subsitemap 
file, it works.

Even If I make a fake update in the MAIN 
sitemap file, I've got the Exception.


Regards.
Laurent



===
but for (2) look at the documnentation for the

  reload-method="synchron" attribute/value.
  
  (example under:
  http://wiki.cocoondev.org/Wiki.jsp?page=BeginnerSWTutorial_01
  and
  http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html
   - in the section 'Reloading'_
  -- 
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

"The CSIR exercises no editorial control over E-mail messages and/or
attachments thereto/links referred to therein originating in the
organisation and the views in this message/attachments thereto are
therefore not necessarily those of the CSIR and/or its employees.
The sender of this e-mail is, moreover, in terms of the CSIR's Conditions
of Service, subject to compliance with the CSIR's internal E-mail and
Internet Policy."



RE: Is this question too simple to be answered ?

2003-02-20 Thread Derek Hohls



Well, Cocoon is not going to recognize the need
to reload *unless* there is a change; but you should
not be getting null pointer - for debugging its usually easier
to make one change at a time to try and pin down the 
source. Alternativelty, try with a new sitemap OR move the
existing one somewhere else...?

And, yes, Cocoon is very difficult *in the beginning*
when you don't know what youare doing (or fail to
understand how it is carrying your instructions) - and
quite unforgiving of careless mistakes.

(Last night, for example, I found I needed to add a **
to the start of a match so I could call an 'internal' pipeline
from anywhere in the sitemap - its taken me_one week__
of working nights to try all sorts of changes and combos 
because of not understanding or knowing one small thing 
;-( [EMAIL PROTECTED] 20/02/2003 01:38:43 

I don't think so because just a "fake" 
modification in the subsitemap
file (just to change the date of the file) 
makes things go right.

I think the problem is a Cocoon's reload 
problem or the problem is ME.

Laurent.

nb : from the beginning, Cocoon is very 
horrible with me ...

  =
  Null Pointer exceptions are my worst ;-( but often
  the root problem is a simple one - it sounds like
  something is wrong with the 
subsitemap-- 
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

"The CSIR exercises no editorial control over E-mail messages and/or
attachments thereto/links referred to therein originating in the
organisation and the views in this message/attachments thereto are
therefore not necessarily those of the CSIR and/or its employees.
The sender of this e-mail is, moreover, in terms of the CSIR's Conditions
of Service, subject to compliance with the CSIR's internal E-mail and
Internet Policy."



XSP question

2003-02-19 Thread Nesto



Hi!
Sorry if I repost a question, but I need 
help!
I want to convert my JSP in XSP, and I have to 
reuse complex Javabeans.

I read in the Logicsheet documentatin that there is 
a xbean library that provides functionallity similar to the jsp:useBean 
directives.
But I didn't found much more documentation, and I 
don't know how to use it!
Where I can read more?

Please give me some hint on how"translate" my 

jsp:useBean id="xxx" scope="session" 
class="yyy.zzz" / of my old JSP, in code for my new XSP

Regards,
Nesto


AW: XSP question

2003-02-19 Thread Marco Rolappe
hi nesto,

I don't know the xbean logicsheet at all (doesn't seem to be in cocoon =
2.0.4), but anyway;

in the simplest case, the jsp:useBean boils down to a variable declaration
(scope = page):

jsp:useBean id=myBean scope=page class=mypackage.MyClass/

would have an equivalent of something like this:

xsp:logic
mypackage.MyClass
myBean = new mypackage.MyClass ();
/xsp:logic


for the other scopes you have to store/load those variables in/from the
respective contexts: for session scope it's the session, for application
scope it's the ServletContext. both have getAttribute()/setAttribute() which
you can utilize.

hope this helps, in case that xbean logicsheet is not available. you
eventually might want to take a lookt at the JSP spec.

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im Auftrag
von Nesto
Gesendet: Mittwoch, 19. Februar 2003 15:11
An: [EMAIL PROTECTED]
Betreff: XSP question


Hi!
Sorry if I repost a question, but I need help!
I want to convert my JSP in XSP, and I have to reuse complex Javabeans.

I read in the Logicsheet documentatin that there is a xbean library that
provides functionallity similar to the jsp:useBean directives.
But I didn't found much more documentation, and I don't know how to use it!
Where I can read more?

Please give me some hint on how translate my
jsp:useBean id=xxx scope=session class=yyy.zzz / of my old JSP, in
code for my new XSP

Regards,
Nesto


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: AW: XSP question

2003-02-19 Thread Geoff Howard
no xbean logicsheet exists in 2.x.  I have seen a start of such from 1.x 
but it would be non-functional now.  The advice below should be what you 
need, with the obvious understanding that autopopulating fields as you get 
with useBean does not exist.

Geoff Howard

At 02:46 PM 2/19/2003, you wrote:
hi nesto,

I don't know the xbean logicsheet at all (doesn't seem to be in cocoon =
2.0.4), but anyway;

in the simplest case, the jsp:useBean boils down to a variable declaration
(scope = page):

jsp:useBean id=myBean scope=page class=mypackage.MyClass/

would have an equivalent of something like this:

xsp:logic
mypackage.MyClass
myBean = new mypackage.MyClass ();
/xsp:logic


for the other scopes you have to store/load those variables in/from the
respective contexts: for session scope it's the session, for application
scope it's the ServletContext. both have getAttribute()/setAttribute() which
you can utilize.

hope this helps, in case that xbean logicsheet is not available. you
eventually might want to take a lookt at the JSP spec.

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im Auftrag
von Nesto
Gesendet: Mittwoch, 19. Februar 2003 15:11
An: [EMAIL PROTECTED]
Betreff: XSP question


Hi!
Sorry if I repost a question, but I need help!
I want to convert my JSP in XSP, and I have to reuse complex Javabeans.

I read in the Logicsheet documentatin that there is a xbean library that
provides functionallity similar to the jsp:useBean directives.
But I didn't found much more documentation, and I don't know how to use it!
Where I can read more?

Please give me some hint on how translate my
jsp:useBean id=xxx scope=session class=yyy.zzz / of my old JSP, in
code for my new XSP

Regards,
Nesto


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: AW: XSP question

2003-02-19 Thread Mark H
I use helpbean logicsheet http://www.oio.de/m/taglib/beanhelp.zip

xsp:page xmlns:xsp=http://apache.org/xsp;
xmlns:help=http://www.oio.de/help;
page
help:useBean id=vm scope=page class=Common/
help:setProperty name=vm property=path param=path/
someTaghelp:getProperty name=vm 
property=someProperty//someTag
/page
/xsp:page

Mark

-Original Message-
From: Geoff Howard [mailto:[EMAIL PROTECTED]]
Sent: 19 February 2003 08:45PM
To: [EMAIL PROTECTED]
Subject: Re: AW: XSP question


no xbean logicsheet exists in 2.x.  I have seen a start of such from 1.x
but it would be non-functional now.  The advice below should be what you
need, with the obvious understanding that autopopulating fields as you get
with useBean does not exist.

Geoff Howard

At 02:46 PM 2/19/2003, you wrote:
hi nesto,

I don't know the xbean logicsheet at all (doesn't seem to be in cocoon =
2.0.4), but anyway;

in the simplest case, the jsp:useBean boils down to a variable
declaration
(scope = page):

jsp:useBean id=myBean scope=page class=mypackage.MyClass/

would have an equivalent of something like this:

xsp:logic
 mypackage.MyClass
 myBean = new mypackage.MyClass ();
/xsp:logic


for the other scopes you have to store/load those variables in/from the
respective contexts: for session scope it's the session, for application
scope it's the ServletContext. both have getAttribute()/setAttribute()
which
you can utilize.

hope this helps, in case that xbean logicsheet is not available. you
eventually might want to take a lookt at the JSP spec.

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im
Auftrag
von Nesto
Gesendet: Mittwoch, 19. Februar 2003 15:11
An: [EMAIL PROTECTED]
Betreff: XSP question


Hi!
Sorry if I repost a question, but I need help!
I want to convert my JSP in XSP, and I have to reuse complex Javabeans.

I read in the Logicsheet documentatin that there is a xbean library that
provides functionallity similar to the jsp:useBean directives.
But I didn't found much more documentation, and I don't know how to use it!
Where I can read more?

Please give me some hint on how translate my
jsp:useBean id=xxx scope=session class=yyy.zzz / of my old JSP, in
code for my new XSP

Regards,
Nesto


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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






-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




question about cocoon object

2003-02-13 Thread Lionel Crine
/* I'm reading the code located in the requestgenerator */


 public void generate()
throws SAXException {
Request request = ObjectModelHelper.getRequest(objectModel);

	this.contentHandler.startDocument(); === this method comes from 
AbstractXMLProducer
	/*** Add xmlns ***/
	/*this.contentHandler.startPrefixMapping(,URI);*/
AttributesImpl attr=new AttributesImpl();

this.attribute(attr,target, request.getRequestURI());  === this 
method comes from AbstractServerPage




My questions are :

In this.attribute, this reference which object ?
How can a class (requestgenerator) can use object from an abstract class at 
the same level ?


Maybe my question are silly, but I like knowing what I'm reading and using.


Lionel


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



RE: question about cocoon object

2003-02-13 Thread Geoff Howard
Title: RE: question about cocoon object






Maybe I don't understand your question, but this in java refers to the current instance of the class itself. So this refers to the current RequestGenerator object. And this.attribute refers to a method defined somewhere in the class itself or in one of the classes this generator inherits from. You note (partially correctly) that this.contentHandler is inherited from AbstractXMLProducer, but startDocument() is in the contentHandler class, not AbstractXMLProducer. 

Don't know offhand where attribute() is inherited from, but it shouldn't take long to find out - the java docs will tell you where it came from.

Geoff


 -Original Message-

 From: Lionel Crine [mailto:[EMAIL PROTECTED]]

 Sent: Thursday, February 13, 2003 8:23 AM

 To: [EMAIL PROTECTED]

 Subject: question about cocoon object

 

 

 /* I'm reading the code located in the requestgenerator */

 

 

 public void generate()

 throws SAXException {

 Request request = ObjectModelHelper.getRequest(objectModel);

 

  this.contentHandler.startDocument(); === this method 

 comes from 

 AbstractXMLProducer

  /*** Add xmlns ***/

  /*this.contentHandler.startPrefixMapping(,URI);*/

 AttributesImpl attr=new AttributesImpl();

 

 this.attribute(attr,target, 

 request.getRequestURI()); === this 

 method comes from AbstractServerPage

 

 

 

 

 My questions are :

 

 In this.attribute, this reference which object ?

 How can a class (requestgenerator) can use object from an 

 abstract class at 

 the same level ?

 

 

 Maybe my question are silly, but I like knowing what I'm 

 reading and using.

 

 

 Lionel

 

 

 -

 Please check that your question has not already been answered in the

 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 

 To unsubscribe, e-mail: [EMAIL PROTECTED]

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

 

 

 





RE: question about cocoon object

2003-02-13 Thread Lionel Crine
Yes, stardocuments comes from contenthandler.

Another question : where does data method comes from ?
I know that I only have to look at the javadocs, but after long time I 
didn't find where this method comes from.

Also, I'm a little bit surprise about the source of attribute method. 
Where is the link between AbstractServerPage and RequestGenerator ?



At 08:50 13/02/2003 -0500, you wrote:

Maybe I don't understand your question, but this in java refers to the 
current instance of the class itself.  So this refers to the current 
RequestGenerator object.  And this.attribute refers to a method defined 
somewhere in the class itself or in one of the classes this generator 
inherits from.  You note (partially correctly) that this.contentHandler is 
inherited from AbstractXMLProducer, but startDocument() is in the 
contentHandler class, not AbstractXMLProducer.

Don't know offhand where attribute() is inherited from, but it shouldn't 
take long to find out - the java docs will tell you where it came from.

Geoff

 -Original Message-
 From: Lionel Crine [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 13, 2003 8:23 AM
 To: [EMAIL PROTECTED]
 Subject: question about cocoon object


 /* I'm reading the code located in the requestgenerator */


   public void generate()
  throws SAXException {
  Request request = ObjectModelHelper.getRequest(objectModel);

   this.contentHandler.startDocument(); === this method
 comes from
 AbstractXMLProducer
   /*** Add xmlns ***/
   /*this.contentHandler.startPrefixMapping(,URI);*/
  AttributesImpl attr=new AttributesImpl();

  this.attribute(attr,target,
 request.getRequestURI());  === this
 method comes from AbstractServerPage


 

 My questions are :

 In this.attribute, this reference which object ?
 How can a class (requestgenerator) can use object from an
 abstract class at
 the same level ?


 Maybe my question are silly, but I like knowing what I'm
 reading and using.


 Lionel


 -
 Please check that your question  has not already been answered in the
 FAQ before 
posting. 
http://xml.apache.org/cocoon/faq/index.htmlhttp://xml.apache.org/cocoon/faq/index.html 


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





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: question about cocoon object

2003-02-13 Thread Lionel Crine
I found my answers!!




At 08:50 13/02/2003 -0500, you wrote:


Maybe I don't understand your question, but this in java refers to the 
current instance of the class itself.  So this refers to the current 
RequestGenerator object.  And this.attribute refers to a method defined 
somewhere in the class itself or in one of the classes this generator 
inherits from.  You note (partially correctly) that this.contentHandler is 
inherited from AbstractXMLProducer, but startDocument() is in the 
contentHandler class, not AbstractXMLProducer.

Don't know offhand where attribute() is inherited from, but it shouldn't 
take long to find out - the java docs will tell you where it came from.

Geoff

 -Original Message-
 From: Lionel Crine [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 13, 2003 8:23 AM
 To: [EMAIL PROTECTED]
 Subject: question about cocoon object


 /* I'm reading the code located in the requestgenerator */


   public void generate()
  throws SAXException {
  Request request = ObjectModelHelper.getRequest(objectModel);

   this.contentHandler.startDocument(); === this method
 comes from
 AbstractXMLProducer
   /*** Add xmlns ***/
   /*this.contentHandler.startPrefixMapping(,URI);*/
  AttributesImpl attr=new AttributesImpl();

  this.attribute(attr,target,
 request.getRequestURI());  === this
 method comes from AbstractServerPage


 

 My questions are :

 In this.attribute, this reference which object ?
 How can a class (requestgenerator) can use object from an
 abstract class at
 the same level ?


 Maybe my question are silly, but I like knowing what I'm
 reading and using.


 Lionel


 -
 Please check that your question  has not already been answered in the
 FAQ before 
posting. 
http://xml.apache.org/cocoon/faq/index.htmlhttp://xml.apache.org/cocoon/faq/index.html 


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





-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




more specific question about parameters from querystring to JSP

2003-02-11 Thread Eduardo Zurita




I want to pass the parameter "username" with value 
"joe" to my generator (myservice.jsp)

The problem is:

 The user tries the page http://myserver/test.html?username=joe

 And i have the following in 
sitemap.xmap:

map:pipeline 
map:match pattern="test.html" 
map:act type="request" 
map:parameter name="parameters" 
value="true"/ map:generate 
type="jsp" 
src=""/ 
/map:act map:transform 
src=""/ 
map:serialize type="html"/ 
/map:match 
/map:pipeline/map:pipelines

Well, it doesn't work !!! :-(

Is this the correct way?

Please help,

thanks in advance.

Eduardo.


Re: more specific question about parameters from querystring to JSP

2003-02-11 Thread SAXESS - Hussayn Dabbous
You dont need the ?
try (error marked with '== look here ':
map:pipeline
 map:match pattern=test.html
   map:act type=request
 map:parameter name=parameters value=true/
 map:generate type=jsp
 src=services/myservice.jsp{requestQuery}/  == look here
   /map:act
map:transform src=services/stylesheets/myservice.xsl/
   map:serialize type=html/
 /map:match
/map:pipeline
/map:pipelines

Eduardo Zurita wrote:

I want to pass the parameter username with value joe to my generator 
(myservice.jsp)
 
The problem is:
 
The user tries the page http://myserver/test.html?username=joe
 
And i have the following in sitemap.xmap:
 
map:pipeline
map:match pattern=test.html
  map:act type=request
map:parameter name=parameters value=true/
map:generate type=jsp 
src=services/myservice.jsp?{requestQuery}/  
  /map:act
   map:transform src=services/stylesheets/myservice.xsl/
  map:serialize type=html/
/map:match
   /map:pipeline
 /map:pipelines
 
Well, it doesn't work !!! :-(
 
Is this the correct way?
 
Please help,
 
thanks in advance.
 
Eduardo.

--
Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
50935 Köln
Telefon: +49-221-56011-0
Fax: +49-221-56011-20
E-Mail:  [EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: more specific question about parameters from querystring to JSP

2003-02-11 Thread SAXESS - Hussayn Dabbous
you can make it even simpler:

map:pipeline
 map:match pattern=test.html
   map:act type=request
 map:generate type=jsp
 src=services/myservice.jsp{requestQuery}/
   /map:act
map:transform src=services/stylesheets/myservice.xsl/
   map:serialize type=html/
 /map:match
/map:pipeline
/map:pipelines


SAXESS - Hussayn Dabbous wrote:

You dont need the ?
try (error marked with '== look here ':
map:pipeline
 map:match pattern=test.html
   map:act type=request
 map:parameter name=parameters value=true/
 map:generate type=jsp
 src=services/myservice.jsp{requestQuery}/  == look here
   /map:act
map:transform src=services/stylesheets/myservice.xsl/
   map:serialize type=html/
 /map:match
/map:pipeline
/map:pipelines

Eduardo Zurita wrote:


I want to pass the parameter username with value joe to my 
generator (myservice.jsp)
 
The problem is:
 
The user tries the page http://myserver/test.html?username=joe
 
And i have the following in sitemap.xmap:
 
map:pipeline
map:match pattern=test.html
  map:act type=request
map:parameter name=parameters value=true/
map:generate type=jsp 
src=services/myservice.jsp?{requestQuery}//map:act
   map:transform src=services/stylesheets/myservice.xsl/
  map:serialize type=html/
/map:match
   /map:pipeline
 /map:pipelines
 
Well, it doesn't work !!! :-(
 
Is this the correct way?
 
Please help,
 
thanks in advance.
 
Eduardo.




--
Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
50935 Köln
Telefon: +49-221-56011-0
Fax: +49-221-56011-20
E-Mail:  [EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: more specific question about parameters from querystring to JSP

2003-02-11 Thread Eduardo Zurita

Thanks, it worked !!!

- Original Message -
From: SAXESS - Hussayn Dabbous [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 11, 2003 2:56 PM
Subject: Re: more specific question about parameters from querystring to JSP


 You dont need the ?
 try (error marked with '== look here ':
 map:pipeline
   map:match pattern=test.html
 map:act type=request
   map:parameter name=parameters value=true/
   map:generate type=jsp
   src=services/myservice.jsp{requestQuery}/  == look here
 /map:act
  map:transform src=services/stylesheets/myservice.xsl/
 map:serialize type=html/
   /map:match
  /map:pipeline
 /map:pipelines

 Eduardo Zurita wrote:
  I want to pass the parameter username with value joe to my generator
  (myservice.jsp)
 
  The problem is:
 
  The user tries the page http://myserver/test.html?username=joe
 
  And i have the following in sitemap.xmap:
 
  map:pipeline
  map:match pattern=test.html
map:act type=request
  map:parameter name=parameters value=true/
  map:generate type=jsp
  src=services/myservice.jsp?{requestQuery}/
/map:act
 map:transform src=services/stylesheets/myservice.xsl/
map:serialize type=html/
  /map:match
 /map:pipeline
   /map:pipelines
 
  Well, it doesn't work !!! :-(
 
  Is this the correct way?
 
  Please help,
 
  thanks in advance.
 
  Eduardo.

 --
 Dr. Hussayn Dabbous
 SAXESS Software Design GmbH
 Neuenhöfer Allee 125
 50935 Köln
 Telefon: +49-221-56011-0
 Fax: +49-221-56011-20
 E-Mail:  [EMAIL PROTECTED]


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: newbie xsp question

2003-02-04 Thread Jim Bearce
I don't know why the simple.xsp was done the way it was but I believe 
you should also be able to write it this way:

xsp:logic
 for (int i=0; i lt; 3; i++) {
   liItem xsp:expri/xsp:expr/li
 }
/xsp:logic

I think wrapping it in CDATA sections is just to make it possible to use 
the  in the for statement

I-Lin Kuo wrote:

In the sample xsp provided with cocoon, on the page

docs/samples/xsp/simple.xsp

There's a section of code that looks like this:

xsp:logic
  ![CDATA[
  for (int i=0; i3; i++) {]]![CDATA[
  ]]
li
  Item xsp:expri/xsp:expr
/li
  ![CDATA[
  } ]]![CDATA[
  ]]
/xsp:logic

I understand that the CDATA sections are needed to escape the  in 
the for loop declaration, but it seems to me that only one such is 
needed. To test this, I made up another page with the following:

ul
xsp:logic
![CDATA[
for (int j=0;j3;j++) ]]{
liItem xsp:exprj/xsp:expr/li
}
/xsp:logic
/ul

This worked, and confirmed my suspicions. So my question is, why were 
there so many CDATA sections in the original, and when am I supposed 
to use them?

Also, I'd appreciate it if someone could explain what xsp:content is 
supposed to do, or refer me to some place in the documentation where 
all the tags are listed (I couldn't find any).

_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




newbie xsp question

2003-02-03 Thread I-Lin Kuo
In the sample xsp provided with cocoon, on the page

docs/samples/xsp/simple.xsp

There's a section of code that looks like this:

xsp:logic
  ![CDATA[
  for (int i=0; i3; i++) {]]![CDATA[
  ]]
li
  Item xsp:expri/xsp:expr
/li
  ![CDATA[
  } ]]![CDATA[
  ]]
/xsp:logic

I understand that the CDATA sections are needed to escape the  in the for 
loop declaration, but it seems to me that only one such is needed. To test 
this, I made up another page with the following:

ul
xsp:logic
![CDATA[
	for (int j=0;j3;j++) ]]{
		liItem xsp:exprj/xsp:expr/li
	}
/xsp:logic
/ul

This worked, and confirmed my suspicions. So my question is, why were there 
so many CDATA sections in the original, and when am I supposed to use them?

Also, I'd appreciate it if someone could explain what xsp:content is 
supposed to do, or refer me to some place in the documentation where all the 
tags are listed (I couldn't find any).

_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



Question on generators...

2003-01-31 Thread SriKumar Kareti

Thanks for you help in advance...

I am a new user to Cocoon. I have searched the site pretty well and
could
not answer this question. Could someone help...

My goal is to move from current servlet based solution to Cocoon. The
general
flow of my current program is 

1) Take the request, 
2) Generate the XML by making calls to Database based on the parameters 
   passed...
3) Use XSLT to generate html which is returned...

Now I'd like to move to cocoon. I want to use my existing Java class
as the generator in Cocoon.

Can I do that?

SriKumar.

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




  1   2   3   4   5   6   7   >