Value-substitution question

2002-12-25 Thread Anna Afonchenko



Hi All!
I want to get the http request that will provide 
me the URI of the file to generate (and transform).
E.g., the request that I should get will be 
something like cocoon/test/xml.apache.org/cocoon/faq/faq-xslt.html
My pipeline is as following:
map:match pattern="test/**"
 map:generate src=""http://{1}">http://{1}" type="html"/
 map:transform 
src="" type="xslt-saxon"/
 map:serialize 
type="xml"/
/map:match

Here is my problem:
The pipeline matches the given http request only 
if the URI has more than one slash, e.g., the previous example will work file, 
but if the http request is something like
cocoon/test/xml.apache.org/faq-xslt.html (only 
one slash in the given URI that is matched by the wildcard) then I get the error 
from Cocoon:
The requested URI "/cocoon/ub/xml.apache.org/faq-xslt.html" was not 
found

But I can't also use only one asterisk in the 
pattern match, because then I will be able to match only URI's that don't 
contain slashes.

So please, can you tell me what is the right 
pattern match for the URI with any number of slashes (zero, one or 
more)?

Thank you very much for help.

Anna



Re: UTF-8 once more!!!

2002-12-25 Thread Joerg Heinicke
Hello Gia Dinh,

I guess that the parser tries to read in file in UTF-8, which is not 
really in UTF-8. Maybe this file is still saved in ISO-8859-1 on the 
disk. If it is so, I guess it's a text file, because a XML file has a 
header with the correct encoding (and UTF-8 mostly as default).

Have a look into the generated sitemap.java specified in your log file. 
Look at the specified line numbers, maybe you can get more information 
from there, especially which files were tried to read.

Regards,

Joerg

Hong Gia Dinh wrote:
Hi all

I deployed my application in JBoss 3.0.4 , but it can not translate 
languages!!
although it transllate very well in the Tomcat environment.
i dont know if there is any difference between these two environmnet

when i deployed it in JBoss , and choose to translate to other language, 
it stands still and no change!! i check the log it informs error :

java.io.UTFDataFormatException: invalid byte 3 of 3-byte UTF-8 sequence 
(0x3f)
at 
org.apache.xerces.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:678)
at org.apache.xerces.impl.io.UTF8Reader.read(UTF8Reader.java:416)
at 
org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityManager.java:3177) 

at 
org.apache.xerces.impl.XMLEntityManager$EntityScanner.scanContent(XMLEntityManager.java:2293) 

at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(XMLDocumentFragmentScannerImpl.java:830) 


snipped/


at 
org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.resource_admin_page(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1052)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 

at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.cocoon.sitemap.AbstractSitemap.invokeMethod(AbstractSitemap.java:423) 

at 
org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.matchN101BC(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1470)

at 
org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.process(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1276)

at 
org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.process(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1209)

at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)

snipped/



I checked in mail archives but cant fix the problem although i added in 
web.xml :


init-param
param-namecontainer-encoding/param-name
param-valueutf-8/param-value
/init-param
   
init-param
param-nameform-encoding/param-name
param-valueutf-8/param-value
/init-param

as well as all my xsp files indicated that using encoding UTF-8

Can somebody tell me how to fix it??
Thanks in advance and merry chrismast!
GD


-
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: Value-substitution question

2002-12-25 Thread Joerg Heinicke
Hello Anna,

I think the matcher is ok. ** matches everything on every hierarchy 
level (so 0, 1 or more slashes). It seems that something is differently 
resolved, if it's only 1 slash.

 _The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not 
found_

Where does the ub come from?

Regards,

Joerg

Anna Afonchenko wrote:
Hi All!
I want to get the http request that will provide me the URI of the file 
to generate (and transform).
E.g., the request that I should get will be something like 
cocoon/test/xml.apache.org/cocoon/faq/faq-xslt.html
My pipeline is as following:
map:match pattern=test/**
map:generate src=http://{1}; type=html/
map:transform src=test.xsl type=xslt-saxon/
map:serialize type=xml/
/map:match
 
Here is my problem:
The pipeline matches the given http request only if the URI has more 
than one slash, e.g., the previous example will work file, but if the 
http request is something like
cocoon/test/xml.apache.org/faq-xslt.html (only one slash in the given 
URI that is matched by the wildcard) then I get the error from Cocoon:
_The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not found_
 
But I can't also use only one asterisk in the pattern match, because 
then I will be able to match only URI's that don't contain slashes.
 
So please, can you tell me what is the right pattern match for the URI 
with any number of slashes (zero, one or more)?
 
Thank you very much for help.
 
Anna


-
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: UTF-8 once more!!!

2002-12-25 Thread Hong Gia Dinh
Title: RE: UTF-8 once more!!!





Thank you, Joerg.
i checked but i really dont know where the bug is?!! :(
the sitemap.java at the error line are :


 try {
 
 if ((map = action_N101CB.act(redirector, environment, objectModel, null, param)) != null) {
 if (redirector.hasRedirected()) {
 return true;
 }
 if (debug_enabled) getLogger().debug(Action form-validator);
 listOfMaps.add (map);
 this.dumpParameters(listOfMaps);
 
 map = new HashMap(1); // error shows



and :


 if (!internalRequest) { // error shows
 return pipeline.process(environment);
 }


i guess that it cant retrieve the resources!!?? how to fix it?? i really dont know?
have you had any experience with it??can you show me how to fix this??
my directory structure is :
project
- Web-inf
- sitemap.xmap
- translation (messages, messages_en . .. )
- xsp
- style


thanks very much for your help 
GD




-Original Message-
From: Joerg Heinicke [mailto:[EMAIL PROTECTED]]
Sent: 25 December 2002 16:02
To: [EMAIL PROTECTED]
Subject: Re: UTF-8 once more!!!



Hello Gia Dinh,


I guess that the parser tries to read in file in UTF-8, which is not 
really in UTF-8. Maybe this file is still saved in ISO-8859-1 on the 
disk. If it is so, I guess it's a text file, because a XML file has a 
header with the correct encoding (and UTF-8 mostly as default).


Have a look into the generated sitemap.java specified in your log file. 
Look at the specified line numbers, maybe you can get more information 
from there, especially which files were tried to read.


Regards,


Joerg


Hong Gia Dinh wrote:
 Hi all
 
 I deployed my application in JBoss 3.0.4 , but it can not translate 
 languages!!
 although it transllate very well in the Tomcat environment.
 i dont know if there is any difference between these two environmnet
 
 when i deployed it in JBoss , and choose to translate to other language, 
 it stands still and no change!! i check the log it informs error :
 
 java.io.UTFDataFormatException: invalid byte 3 of 3-byte UTF-8 sequence 
 (0x3f)
 at 
 org.apache.xerces.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:678)
 at org.apache.xerces.impl.io.UTF8Reader.read(UTF8Reader.java:416)
 at 
 org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityManager.java:3177) 
 
 at 
 org.apache.xerces.impl.XMLEntityManager$EntityScanner.scanContent(XMLEntityManager.java:2293) 
 
 at 
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(XMLDocumentFragmentScannerImpl.java:830) 



snipped/


 at 
 org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.resource_admin_page(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1052)

 
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
 
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
 
 at java.lang.reflect.Method.invoke(Method.java:324)
 at 
 org.apache.cocoon.sitemap.AbstractSitemap.invokeMethod(AbstractSitemap.java:423) 
 
 at 
 org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.matchN101BC(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1470)

 
 at 
 org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.process(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1276)

 
 at 
 org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.process(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1209)

 
 at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)


snipped/


 
 I checked in mail archives but cant fix the problem although i added in 
 web.xml :
 
 
 init-param
 param-namecontainer-encoding/param-name
 param-valueutf-8/param-value
 /init-param
 
 init-param
 param-nameform-encoding/param-name
 param-valueutf-8/param-value
 /init-param
 
 as well as all my xsp files indicated that using encoding UTF-8
 
 Can somebody tell me how to fix it??
 Thanks in advance and merry chrismast!
 GD



-
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: Value-substitution question

2002-12-25 Thread Anna Afonchenko
Oh, sorry, this is my typo.
The error is of course
The requested URI /cocoon/test/xml.apache.org/faq-xslt.html was not found

But the problem is still the same:
** doesn't match URI xml.apache.org/faq-xslt.html.
I can of course make two pipelines, one will match *, and the other will
match **,
but it is really strange that ** doesn't match the URI with single slash for
me.
What do you mean by something is differently resolved, if it's only 1
slash?
Somebody can solve this mistery for me?

Thank you very much for your help.
Anna


- Original Message -
From: Joerg Heinicke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 25, 2002 11:10 AM
Subject: Re: Value-substitution question


Hello Anna,

I think the matcher is ok. ** matches everything on every hierarchy
level (so 0, 1 or more slashes). It seems that something is differently
resolved, if it's only 1 slash.

  _The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not
found_

Where does the ub come from?

Regards,

Joerg

Anna Afonchenko wrote:
 Hi All!
 I want to get the http request that will provide me the URI of the file
 to generate (and transform).
 E.g., the request that I should get will be something like
 cocoon/test/xml.apache.org/cocoon/faq/faq-xslt.html
 My pipeline is as following:
 map:match pattern=test/**
 map:generate src=http://{1}; type=html/
 map:transform src=test.xsl type=xslt-saxon/
 map:serialize type=xml/
 /map:match

 Here is my problem:
 The pipeline matches the given http request only if the URI has more
 than one slash, e.g., the previous example will work file, but if the
 http request is something like
 cocoon/test/xml.apache.org/faq-xslt.html (only one slash in the given
 URI that is matched by the wildcard) then I get the error from Cocoon:
 _The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not
found_

 But I can't also use only one asterisk in the pattern match, because
 then I will be able to match only URI's that don't contain slashes.

 So please, can you tell me what is the right pattern match for the URI
 with any number of slashes (zero, one or more)?

 Thank you very much for help.

 Anna


-
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]




Cocoon reversing element attributes at output?

2002-12-25 Thread Anna Afonchenko



Hi All.
I am writing xsl file that will catch some nodes 
(according given XPath) and will output these nodes
as a string.
Here is the code snippet that outputs the 
matching node:
xsl:textlt;/xsl:text
xsl:value-of 
select="concat(name(),' ')"/
xsl:for-each 
select="@*"
 
xsl:value-of select="name()"/
 
xsl:text="/xsl:text
 
xsl:value-of select="."/
 
xsl:text" /xsl:text
/xsl:for-each
xsl:textgt;/xsl:text

So, if, for example, the node img 
src="" alt=""/ is caught, then it will be output as is.
When I was running this xsl using batch file, 
everything was OK.
Now I am running it using Cocoon, and although I 
get correct nodes caught, for each node all attributes are output in the reverse 
order, e.g. for the previous example the result in Cocoon is
img alt="" src=""/
This is not a disaster, but it is rather 
frustrating, because I would want to copy this node and search it in the code, 
butif the attributes are reversed, I wouldn't be able to do 
it.

Does anybody know why Cocoon reverses attributes 
order when outputting a node?

Thank you very much for help.
Anna


RE: Cocoon reversing element attributes at output?

2002-12-25 Thread William Brogden
Title: Message



-Original Message-From: Anna 
Afonchenko [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 25, 
2002 5:38 AMTo: cocoon-usersSubject: Cocoon reversing 
element attributes at output?

  Hi All.
  I am writing xsl file that will catch some 
  nodes (according given XPath) and will output these nodes
  as a string.
  Here is the code snippet that outputs the 
  matching node:
  xsl:textlt;/xsl:text
  xsl:value-of 
  select="concat(name(),' ')"/
  xsl:for-each 
  select="@*"
   
  xsl:value-of select="name()"/
   
  xsl:text="/xsl:text
   
  xsl:value-of select="."/
   
  xsl:text" /xsl:text
  /xsl:for-each
  xsl:textgt;/xsl:text
  
  So, if, for example, the node img 
  src="" alt=""/ is caught, then it will be output as 
  is.
  When I was running this xsl using batch file, 
  everything was OK.
  Now I am running it using Cocoon, and although 
  I get correct nodes caught, for each node all attributes are output in the 
  reverse order, e.g. for the previous example the result in Cocoon 
  is
  img alt="" 
src=""/
  This is not a disaster, but it is rather 
  frustrating, because I would want to copy this node and search it in the code, 
  butif the attributes are reversed, I wouldn't be able to do 
  it.
  
  Does anybody know why Cocoon reverses 
  attributes order when outputting a node?
  
  Thank you very much for help.
  Anna
  
  
  The 
  SAX event for the start of an element carries attributes in an 
  Attributes
  collection. The JavaDocs say "the order of attributes in the list 
  isunspecified and may vary
  from 
  implementation to implementation." Therefore you can't rely on the 
  order
  being preserved.
  
  [EMAIL PROTECTED]Author of Soap Programming with Java - 
  Sybex; ISBN: 0782129285Coauthor of Cocoon 2 Programming - Sybex; ISBN: 
  0782141315


Re: xpath question

2002-12-25 Thread Joerg Pietschmann
On Tuesday 24 December 2002 16:46, you wrote:
 Is it possible to pass more than one xpath parameter inside one
 map:generate. I'm trying to play with yahoo sample in cocoon but I want to
 extract 2 nodes, let's say one head/title and one td for the first
 table. But it seems that the pattern recognizes only the last parameter. Is
 it possible to pass more than one parameter like below:

 map:match pattern=yahoo
map:generate src=http://www.yahoo.com; type=html
 map:parameter name=xpath value=/html/head/title/
 map:parameter name=xpath
 value=/html/body/center/table[1]/tr[1]/td[1]/

There can only be one parameter with a certain name. This should
be pretty obvious. (Cocoon devs: this should raise an error).
You can try
map:parameter name=xpath
  value=/html/head/title|/html/body/center/table[1]/tr[1]/td[1]/

which is a valid XPath expression, I havn't tried it myself though.

J.Pietschmann

-
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: Value-substitution question

2002-12-25 Thread Joerg Heinicke
Anna Afonchenko wrote:

Oh, sorry, this is my typo.
The error is of course
The requested URI /cocoon/test/xml.apache.org/faq-xslt.html was not found


Ah, ok.


But the problem is still the same:
** doesn't match URI xml.apache.org/faq-xslt.html.
I can of course make two pipelines, one will match *, and the other will
match **,
but it is really strange that ** doesn't match the URI with single slash for
me.




What do you mean by something is differently resolved, if it's only 1
slash?


I thought this because of the ub in the error message, but if it was 
only a typo ...

Somebody can solve this mistery for me?


Yes, this seems really strange. Can you furnish proof to the contrary by 
adding the matcher with pattern test/* after the matcher test/**? 
Does this work? I never had such a problem with **, so I can only guess: 
Isn't there any match pattern before test/**, which catches the URI? 
And what do the log files say?

As a consolation: For me everything looks ok ;-)

Regards,

Joerg

- Original Message -
From: Joerg Heinicke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 25, 2002 11:10 AM
Subject: Re: Value-substitution question


Hello Anna,

I think the matcher is ok. ** matches everything on every hierarchy
level (so 0, 1 or more slashes). It seems that something is differently
resolved, if it's only 1 slash.

  _The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not
found_

Where does the ub come from?

Regards,

Joerg

Anna Afonchenko wrote:


Hi All!
I want to get the http request that will provide me the URI of the file
to generate (and transform).
E.g., the request that I should get will be something like
cocoon/test/xml.apache.org/cocoon/faq/faq-xslt.html
My pipeline is as following:
map:match pattern=test/**
   map:generate src=http://{1}; type=html/
   map:transform src=test.xsl type=xslt-saxon/
   map:serialize type=xml/
/map:match

Here is my problem:
The pipeline matches the given http request only if the URI has more
than one slash, e.g., the previous example will work file, but if the
http request is something like
cocoon/test/xml.apache.org/faq-xslt.html (only one slash in the given
URI that is matched by the wildcard) then I get the error from Cocoon:
_The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not


found_


But I can't also use only one asterisk in the pattern match, because
then I will be able to match only URI's that don't contain slashes.

So please, can you tell me what is the right pattern match for the URI
with any number of slashes (zero, one or more)?

Thank you very much for help.

Anna




-
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: UTF-8 once more!!!

2002-12-25 Thread Joerg Heinicke
 when i deployed it in JBoss , and choose to translate to other
 language, it stands still and no change!!

Does it work without translation? If yes, how does the sitemap.xmap part 
for translation look like? Maybe it's the translation catalogue (in 
which way ever you translate), which is in the wrong encoding.

Joerg

Hong Gia Dinh wrote:
Thank you, Joerg.
i checked but i really dont know where the bug is?!! :(
the sitemap.java at the error line are :

try {
   
if ((map = action_N101CB.act(redirector, environment, 
objectModel, null, param)) != null) {
  if (redirector.hasRedirected()) {
 return true;
  }
  if (debug_enabled) getLogger().debug(Action form-validator);
  listOfMaps.add (map);
  this.dumpParameters(listOfMaps);
 
map = new HashMap(1); // error shows


and :

 if (!internalRequest) { // error shows
return pipeline.process(environment);
  }

i guess that it cant retrieve the resources!!?? how to fix it?? i really 
dont know?
have you had any experience with it??can you show me how to fix this??
my directory structure is :
project
- Web-inf
- sitemap.xmap
- translation (messages, messages_en . .. )
- xsp
- style

thanks very much for your help
GD



-Original Message-
From: Joerg Heinicke [mailto:[EMAIL PROTECTED]]
Sent: 25 December 2002 16:02
To: [EMAIL PROTECTED]
Subject: Re: UTF-8 once more!!!


Hello Gia Dinh,

I guess that the parser tries to read in file in UTF-8, which is not
really in UTF-8. Maybe this file is still saved in ISO-8859-1 on the
disk. If it is so, I guess it's a text file, because a XML file has a
header with the correct encoding (and UTF-8 mostly as default).

Have a look into the generated sitemap.java specified in your log file.
Look at the specified line numbers, maybe you can get more information
from there, especially which files were tried to read.

Regards,

Joerg

Hong Gia Dinh wrote:
  Hi all
 
  I deployed my application in JBoss 3.0.4 , but it can not translate
  languages!!
  although it transllate very well in the Tomcat environment.
  i dont know if there is any difference between these two environmnet
 
  when i deployed it in JBoss , and choose to translate to other language,
  it stands still and no change!! i check the log it informs error :
 
  java.io.UTFDataFormatException: invalid byte 3 of 3-byte UTF-8 sequence
  (0x3f)
  at
  org.apache.xerces.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:678)
  at 
org.apache.xerces.impl.io.UTF8Reader.read(UTF8Reader.java:416)
  at
  
org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityManager.java:3177) 

 
  at
  
org.apache.xerces.impl.XMLEntityManager$EntityScanner.scanContent(XMLEntityManager.java:2293) 

 
  at
  
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(XMLDocumentFragmentScannerImpl.java:830) 

 

snipped/

  at
  
org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.resource_admin_page(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1052)

 
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

 
  at
  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 

 
  at java.lang.reflect.Method.invoke(Method.java:324)
  at
  
org.apache.cocoon.sitemap.AbstractSitemap.invokeMethod(AbstractSitemap.java:423) 

 
  at
  
org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.matchN101BC(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1470)

 
  at
  
org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.process(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1276)

 
  at
  
org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.process(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1209)

 
  at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
  at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)

snipped/

 
  I checked in mail archives but cant fix the problem although i added in
  web.xml :
 
 
  init-param
  param-namecontainer-encoding/param-name
  param-valueutf-8/param-value
  /init-param

  init-param
  param-nameform-encoding/param-name
   

RE: UTF-8 once more!!!

2002-12-25 Thread Hong Gia Dinh
Title: RE: UTF-8 once more!!!





thanks again about your nice reply!
i wonder because i ran it in Tomcat alone, it can translate but when i deploy them in JBoss with my war file, it work but can not translate???!!! is there any difference between 2 environment??

here is my sitemap :


. . .
map:resources
 map:resource name=admin-page
  map:generate type=serverpages src="">
  map:transform type=i18n
   map:parameter name=locale value={../locale}/
  /map:transform
  map:transform src="">
   map:parameter name=use-request-parameters value=true/
   map:parameter name=css-stylesheet value=admin/admin.css/
   map:parameter name=base-url value=/saigoncoop/
   map:parameter name=locale value={../locale}/
   map:parameter name=page value={target}/
  /map:transform
  map:serialize/
 /map:resource
 
 !-- === Pipelines == --
 map:pipelines
  map:pipeline
   map:act type=locale
map:match pattern=adminvalidate-create-policy
 map:act type=form-validator
  map:parameter name=descriptor value=admin/system/admin-system-descriptor.xml/

  map:parameter name=validate-set value=admin-system-validate/
  map:call resource=admin-page
   map:parameter name=target value=create-policy/
  /map:call
 /map:act
 map:call resource=admin-page
  map:parameter name=target value=create-policy-error/
 /map:call
/map:match
   /map:act


and my file structure :
webcontext
- translation (messages.xml, messagges_en.xml, . . .)
- Web-inf
- sitemap.xmap
- admin
 - system (xsp files, xml files)
 - style (css, xsl files)


have you ever met situation so? or do you know how to fix it? thanks again very much.


GD






-Original Message-
From: Joerg Heinicke [mailto:[EMAIL PROTECTED]]
Sent: 26 December 2002 00:24
To: [EMAIL PROTECTED]
Subject: Re: UTF-8 once more!!!



 when i deployed it in JBoss , and choose to translate to other
 language, it stands still and no change!!


Does it work without translation? If yes, how does the sitemap.xmap part 
for translation look like? Maybe it's the translation catalogue (in 
which way ever you translate), which is in the wrong encoding.


Joerg


Hong Gia Dinh wrote:
 Thank you, Joerg.
 i checked but i really dont know where the bug is?!! :(
 the sitemap.java at the error line are :
 
 try {
 
 if ((map = action_N101CB.act(redirector, environment, 
 objectModel, null, param)) != null) {
 if (redirector.hasRedirected()) {
 return true;
 }
 if (debug_enabled) getLogger().debug(Action form-validator);
 listOfMaps.add (map);
 this.dumpParameters(listOfMaps);
 
 map = new HashMap(1); // error shows
 
 
 and :
 
 if (!internalRequest) { // error shows
 return pipeline.process(environment);
 }
 
 i guess that it cant retrieve the resources!!?? how to fix it?? i really 
 dont know?
 have you had any experience with it??can you show me how to fix this??
 my directory structure is :
 project
 - Web-inf
 - sitemap.xmap
 - translation (messages, messages_en . .. )
 - xsp
 - style
 
 thanks very much for your help
 GD
 
 
 
 -Original Message-
 From: Joerg Heinicke [mailto:[EMAIL PROTECTED]]
 Sent: 25 December 2002 16:02
 To: [EMAIL PROTECTED]
 Subject: Re: UTF-8 once more!!!
 
 
 Hello Gia Dinh,
 
 I guess that the parser tries to read in file in UTF-8, which is not
 really in UTF-8. Maybe this file is still saved in ISO-8859-1 on the
 disk. If it is so, I guess it's a text file, because a XML file has a
 header with the correct encoding (and UTF-8 mostly as default).
 
 Have a look into the generated sitemap.java specified in your log file.
 Look at the specified line numbers, maybe you can get more information
 from there, especially which files were tried to read.
 
 Regards,
 
 Joerg
 
 Hong Gia Dinh wrote:
  Hi all
 
  I deployed my application in JBoss 3.0.4 , but it can not translate
  languages!!
  although it transllate very well in the Tomcat environment.
  i dont know if there is any difference between these two environmnet
 
  when i deployed it in JBoss , and choose to translate to other language,
  it stands still and no change!! i check the log it informs error :
 
  java.io.UTFDataFormatException: invalid byte 3 of 3-byte UTF-8 sequence
  (0x3f)
  at
  org.apache.xerces.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:678)
  at 
 org.apache.xerces.impl.io.UTF8Reader.read(UTF8Reader.java:416)
  at
  
 org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityManager.java:3177) 
 
 
  at
  
 org.apache.xerces.impl.XMLEntityManager$EntityScanner.scanContent(XMLEntityManager.java:2293) 
 
 
  at
  
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(XMLDocumentFragmentScannerImpl.java:830) 
 
 
 
 snipped/
 
  at
  
 org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.resource_admin_page(C:\softs\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1052)

 
 

RE: Value-substitution question

2002-12-25 Thread Geoff Howard
The error isn't saying that no match occurred, but that the generator
failed.  Are you certain that the resource you're trying to reach is there?
For instance, http://xml.apache.org/faq-xslt.html is non-existant, which I
would expect to give the exact error you're getting.

Geoff Howard

 -Original Message-
 From: Joerg Heinicke [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 25, 2002 12:19 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Value-substitution question


 Anna Afonchenko wrote:
  Oh, sorry, this is my typo.
  The error is of course
  The requested URI /cocoon/test/xml.apache.org/faq-xslt.html
 was not found

 Ah, ok.

  But the problem is still the same:
  ** doesn't match URI xml.apache.org/faq-xslt.html.
  I can of course make two pipelines, one will match *, and the other will
  match **,
  but it is really strange that ** doesn't match the URI with
 single slash for
  me.


  What do you mean by something is differently resolved, if it's only 1
  slash?

 I thought this because of the ub in the error message, but if it was
 only a typo ...

  Somebody can solve this mistery for me?

 Yes, this seems really strange. Can you furnish proof to the contrary by
 adding the matcher with pattern test/* after the matcher test/**?
 Does this work? I never had such a problem with **, so I can only guess:
 Isn't there any match pattern before test/**, which catches the URI?
 And what do the log files say?

 As a consolation: For me everything looks ok ;-)

 Regards,

 Joerg

  - Original Message -
  From: Joerg Heinicke [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, December 25, 2002 11:10 AM
  Subject: Re: Value-substitution question
 
 
  Hello Anna,
 
  I think the matcher is ok. ** matches everything on every hierarchy
  level (so 0, 1 or more slashes). It seems that something is differently
  resolved, if it's only 1 slash.
 
_The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not
  found_
 
  Where does the ub come from?
 
  Regards,
 
  Joerg
 
  Anna Afonchenko wrote:
 
 Hi All!
 I want to get the http request that will provide me the URI of the file
 to generate (and transform).
 E.g., the request that I should get will be something like
 cocoon/test/xml.apache.org/cocoon/faq/faq-xslt.html
 My pipeline is as following:
 map:match pattern=test/**
 map:generate src=http://{1}; type=html/
 map:transform src=test.xsl type=xslt-saxon/
 map:serialize type=xml/
 /map:match
 
 Here is my problem:
 The pipeline matches the given http request only if the URI has more
 than one slash, e.g., the previous example will work file, but if the
 http request is something like
 cocoon/test/xml.apache.org/faq-xslt.html (only one slash in the given
 URI that is matched by the wildcard) then I get the error from Cocoon:
 _The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not
 
  found_
 
 But I can't also use only one asterisk in the pattern match, because
 then I will be able to match only URI's that don't contain slashes.
 
 So please, can you tell me what is the right pattern match for the URI
 with any number of slashes (zero, one or more)?
 
 Thank you very much for help.
 
 Anna



 -
 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: pipeline parameter forward is it possible?

2002-12-25 Thread Joerg Heinicke
If you did not solve it until now:

(http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html, search for 
calling resources at this site.)

map:pipeline
  map:match pattern=site
map:call resource=buildsite
  map:parameter name=lang value={lang}/
/map:call
  /map:match
/map:pipeline

Now you can use {lang} in your map:resource/ too.

Regards,

Joerg

Cocoon User wrote:

what i have to do:


i have content.xml

i can call this file using 2 parameters

/content.xml?lang=GR
/content.xml?lang=EN

the problem is that i dont call this resource directly
but through a pipeline



map:resources
map:resource name=buildsite
map:aggregate element=site
map:part src=menu.xml/
map:part src=content.xml/
/map:aggregate
map:serialize type=xml/
/map:resource
/map:resources


map:pipeline
	map:match pattern=site

	map:call resource=buildsite/
	/map:match
/map:pipeline

THE question:

how can i call http://./site?lang=GR

and then into the sitemap pass this [lang=GR]
to map:resource

any idea?


thnx

stavros



-
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: Cocoon XML transformer

2002-12-25 Thread Joerg Heinicke
long (for problems): 
http://outerthought.net/wiki/Wiki.jsp?page=DocbookTransformation

short: http://outerthought.net/wiki/Wiki.jsp?page=Saxon

But for me it sounds more like an encoding problem than a problem with 
Xalan in general.

Joerg

Ravi Shankar wrote:
Hi,
 
In Cocoon documentation, I saw that we can chose the XML transformer 
for Cocoon ( Xalan or SAXON etc). With Xalan transformer I am getting 
problem with some Japanese characters. Those characters are coming as 
? marks. So I want to try Cocoon with Saxon. Please let me know the 
procedure for that.
 
Thank you.
 
Regards,
Ravi


-
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]




Pizza bug!!

2002-12-25 Thread Hong Gia Dinh
Title: Pizza bug!!





Hi all,


I deployed my application in JBoss 3.0.4, in my page when i press confirm button to connect to ejb it keeps on informing error, concerning Pizza like this :

ERROR (2002-12-26) 14:16.47:789 [sitemap] (/saigoncoop/adminvalidate-create-policy) HttpProcessor[8080][1]/sitemap_xmap: Sitemap

org.apache.cocoon.ProcessingException: java.lang.NullPointerException
 at org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:204)
 at org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:202)
 at org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:278)
 at org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:141)
 at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:317)
 at org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.resource_admin_page(C:\NewJBossCocoon\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1061)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.cocoon.sitemap.AbstractSitemap.invokeMethod(AbstractSitemap.java:423)
 at org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.matchN4001C2(C:\NewJBossCocoon\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1458)

 at org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.process(C:\NewJBossCocoon\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1286)

 at org.apache.cocoon.www.jndi_.localhost.saigoncoop.sitemap_xmap.process(C:\NewJBossCocoon\tomcat-4.1.x\work\MainEngine\localhost\saigoncoop\cocoon-files\org/apache/cocoon/www/jndi_/localhost/saigoncoop\sitemap_xmap.java:1218)

 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(ApplicationFilterChain.java:247)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
 at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.java:191)
 at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
 at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 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:2396)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
 at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
 at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
 at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
 at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 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.StandardEngineValve.invoke(StandardEngineValve.java:174)
 at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at 

RE: UTF-8 once more!!! FIXED!!!

2002-12-25 Thread Hong Gia Dinh
Title: RE: UTF-8 once more!!!



OK !!! 
i fixed this bug!! i change to use encoding ISO-8859-1 all my documents so it 
can change languages!!!


  -Original Message-From: Hong Gia Dinh 
  Sent: 26 December 2002 09:17To: 
  [EMAIL PROTECTED]Subject: RE: UTF-8 once 
  more!!!
  thanks again about your nice reply! i 
  wonder because i ran it in Tomcat alone, it can translate but when i deploy 
  them in JBoss with my war file, it work but can not translate???!!! is there 
  any difference between 2 environment??
  here is my sitemap : 
  . . . map:resources 
   map:resource 
  name="admin-page"  
   map:generate 
  type="serverpages" src=""/ 
   
   map:transform 
  type="i18n"  
   
   map:parameter 
  name="locale" value="{../locale}"/ 
   
   /map:transform 
   
   map:transform 
  src="" 
   
   
   map:parameter 
  name="use-request-parameters" value="true"/ 
   
   
   map:parameter 
  name="css-stylesheet" value="admin/admin.css"/ 
   
   
   map:parameter 
  name="base-url" value="/saigoncoop"/ 
   
   
   map:parameter 
  name="locale" value="{../locale}"/ 
   
   
   map:parameter 
  name="page" value="{target}"/ 
   
   /map:transform 
   
   map:serialize/ 
   /map:resource 
   
   !-- 
  === Pipelines == -- 
   map:pipelines 
   
   map:pipeline 
   
   
   map:act 
  type="locale"  
   
   
   map:match 
  pattern="adminvalidate-create-policy" 
   
   
   
   
   map:act 
  type="form-validator" 
   
   
   
   
   
   map:parameter 
  name="descriptor" 
  value="admin/system/admin-system-descriptor.xml"/
   
   
   
   
   
   map:parameter 
  name="validate-set" value="admin-system-validate"/ 
   
   
   
   
   
   map:call 
  resource="admin-page" 
   
   
   
   
   
   
   map:parameter 
  name="target" value="create-policy"/ 
   
   
   
   
   
   /map:call  
   
   
   
   /map:act  
   
   
   
   map:call 
  resource="admin-page" 
   
   
   
   
   
   map:parameter 
  name="target" value="create-policy-error"/ 
   
   
   
   
   /map:call  
   
   
   /map:match 
   
   
   /map:act 
  and my file structure : webcontext - translation (messages.xml, 
  messagges_en.xml, . . .) - Web-inf - sitemap.xmap


Re: Value-substitution question

2002-12-25 Thread Konstantin Piroumian
From: Anna Afonchenko [EMAIL PROTECTED]

 Oh, sorry, this is my typo.
 The error is of course
 The requested URI /cocoon/test/xml.apache.org/faq-xslt.html was not
found

 But the problem is still the same:
 ** doesn't match URI xml.apache.org/faq-xslt.html.
 I can of course make two pipelines, one will match *, and the other will
 match **,
 but it is really strange that ** doesn't match the URI with single slash
for
 me.
 What do you mean by something is differently resolved, if it's only 1
 slash?
 Somebody can solve this mistery for me?

This is known behavior of ** patterns. They match only paths, while *
pattern matches a file (no slashes in the name). I know this is not very
convinient to create two identical matchers, but as you could see from
sample sitemaps this is a usual situation and it's solved using two
matchers, one for ** paths and one for *. Another solution could be to
use the regexp matcher with an appropriate expression.

Try to raise this issue on dev list and probably this will be solved somehow
in future releases. (One of the possibilities could be to allow expressions
like test/** | test/* in patterns.)

Konstantin


 Thank you very much for your help.
 Anna


 - Original Message -
 From: Joerg Heinicke [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, December 25, 2002 11:10 AM
 Subject: Re: Value-substitution question


 Hello Anna,

 I think the matcher is ok. ** matches everything on every hierarchy
 level (so 0, 1 or more slashes). It seems that something is differently
 resolved, if it's only 1 slash.

   _The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not
 found_

 Where does the ub come from?

 Regards,

 Joerg

 Anna Afonchenko wrote:
  Hi All!
  I want to get the http request that will provide me the URI of the file
  to generate (and transform).
  E.g., the request that I should get will be something like
  cocoon/test/xml.apache.org/cocoon/faq/faq-xslt.html
  My pipeline is as following:
  map:match pattern=test/**
  map:generate src=http://{1}; type=html/
  map:transform src=test.xsl type=xslt-saxon/
  map:serialize type=xml/
  /map:match
 
  Here is my problem:
  The pipeline matches the given http request only if the URI has more
  than one slash, e.g., the previous example will work file, but if the
  http request is something like
  cocoon/test/xml.apache.org/faq-xslt.html (only one slash in the given
  URI that is matched by the wildcard) then I get the error from Cocoon:
  _The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not
 found_
 
  But I can't also use only one asterisk in the pattern match, because
  then I will be able to match only URI's that don't contain slashes.
 
  So please, can you tell me what is the right pattern match for the URI
  with any number of slashes (zero, one or more)?
 
  Thank you very much for help.
 
  Anna


 -
 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]




Re: Value-substitution question

2002-12-25 Thread Anna Afonchenko
Thank you Konstantin.
Now I understand it, and know how to use proper matter matches.

Thank you
Anna

- Original Message -
From: Konstantin Piroumian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 26, 2002 9:41 AM
Subject: Re: Value-substitution question


From: Anna Afonchenko [EMAIL PROTECTED]

 Oh, sorry, this is my typo.
 The error is of course
 The requested URI /cocoon/test/xml.apache.org/faq-xslt.html was not
found

 But the problem is still the same:
 ** doesn't match URI xml.apache.org/faq-xslt.html.
 I can of course make two pipelines, one will match *, and the other will
 match **,
 but it is really strange that ** doesn't match the URI with single slash
for
 me.
 What do you mean by something is differently resolved, if it's only 1
 slash?
 Somebody can solve this mistery for me?

This is known behavior of ** patterns. They match only paths, while *
pattern matches a file (no slashes in the name). I know this is not very
convinient to create two identical matchers, but as you could see from
sample sitemaps this is a usual situation and it's solved using two
matchers, one for ** paths and one for *. Another solution could be to
use the regexp matcher with an appropriate expression.

Try to raise this issue on dev list and probably this will be solved somehow
in future releases. (One of the possibilities could be to allow expressions
like test/** | test/* in patterns.)

Konstantin


 Thank you very much for your help.
 Anna


 - Original Message -
 From: Joerg Heinicke [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, December 25, 2002 11:10 AM
 Subject: Re: Value-substitution question


 Hello Anna,

 I think the matcher is ok. ** matches everything on every hierarchy
 level (so 0, 1 or more slashes). It seems that something is differently
 resolved, if it's only 1 slash.

   _The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not
 found_

 Where does the ub come from?

 Regards,

 Joerg

 Anna Afonchenko wrote:
  Hi All!
  I want to get the http request that will provide me the URI of the file
  to generate (and transform).
  E.g., the request that I should get will be something like
  cocoon/test/xml.apache.org/cocoon/faq/faq-xslt.html
  My pipeline is as following:
  map:match pattern=test/**
  map:generate src=http://{1}; type=html/
  map:transform src=test.xsl type=xslt-saxon/
  map:serialize type=xml/
  /map:match
 
  Here is my problem:
  The pipeline matches the given http request only if the URI has more
  than one slash, e.g., the previous example will work file, but if the
  http request is something like
  cocoon/test/xml.apache.org/faq-xslt.html (only one slash in the given
  URI that is matched by the wildcard) then I get the error from Cocoon:
  _The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not
 found_
 
  But I can't also use only one asterisk in the pattern match, because
  then I will be able to match only URI's that don't contain slashes.
 
  So please, can you tell me what is the right pattern match for the URI
  with any number of slashes (zero, one or more)?
 
  Thank you very much for help.
 
  Anna


 -
 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]