Parsing semicolons in URIs

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Parsing semicolons in URIs

Jeni Tennison
Hi,

I have a requirement to support URIs such as:

   http://www.example.com/ukpga/1985/67/england;wales

and want to parse the URI within the page flow with the regular  
expression like:

   /([^/]+)/([0-9]{4})/([0-9]{2})/((england|wales|scotland|ni)(;
(england|wales|scotland|ni))*)

It appears that the page flow is only allowing me to process the URI  
up until the semi-colon. Anything past that isn't included in the  
values of parameters.

How can I process the URI including the text after the semicolon?

Jeni
--
Jeni Tennison
http://www.jenitennison.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Parsing semicolons in URIs

Hank Ratzesberger
Jenny,

the semicolon is the default parameter separator in the XForms spec.,
haven't checked the code yet to see how it's handled and if there
is a work around.

As a test, if you are handling this in a pipeline, you could
start with the RequestGenerator where the missing part after
the semicolon might show up.

http://www.orbeon.com/ops/doc/processors-generators-request

Could be a helpful test.

--Hank

On Jul 20, 2009, at 5:54 AM, Jeni Tennison wrote:

> Hi,
>
> I have a requirement to support URIs such as:
>
>   http://www.example.com/ukpga/1985/67/england;wales
>
> and want to parse the URI within the page flow with the regular  
> expression like:
>
>   /([^/]+)/([0-9]{4})/([0-9]{2})/((england|wales|scotland|ni)(;
> (england|wales|scotland|ni))*)
>
> It appears that the page flow is only allowing me to process the  
> URI up until the semi-colon. Anything past that isn't included in  
> the values of parameters.
>
> How can I process the URI including the text after the semicolon?
>
> Jeni
> --
> Jeni Tennison
> http://www.jenitennison.com
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Parsing semicolons in URIs

Jeni Tennison
In reply to this post by Jeni Tennison
In the regular expression? Yes, that didn't have any effect.

Jeni

On 20 Jul 2009, at 15:04, Ethan Gruber wrote:

> Have you tried escaping the semicolon?  e. g.
>
> \;
>
> Ethan
>
> On Mon, Jul 20, 2009 at 8:54 AM, Jeni Tennison  
> <[hidden email]> wrote:
> Hi,
>
> I have a requirement to support URIs such as:
>
>  http://www.example.com/ukpga/1985/67/england;wales
>
> and want to parse the URI within the page flow with the regular  
> expression like:
>
>  /([^/]+)/([0-9]{4})/([0-9]{2})/((england|wales|scotland|ni)(;
> (england|wales|scotland|ni))*)
>
> It appears that the page flow is only allowing me to process the URI  
> up until the semi-colon. Anything past that isn't included in the  
> values of parameters.
>
> How can I process the URI including the text after the semicolon?
>
> Jeni
> --
> Jeni Tennison
> http://www.jenitennison.com
>
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>
--
Jeni Tennison
http://www.jenitennison.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Parsing semicolons in URIs

Erik Bruchez-3
A quick look with the debugger shows that the servlet API doesn't
return what's after the semicolon with getServletPath() and/or
getPathInfo()! This is not in the query string either. However this is
present with getRequestURI(). Technically, I guess the semicolon is
not allowed in the path part of the URL?

-Erik

On Mon, Jul 20, 2009 at 9:52 AM, Jeni Tennison<[hidden email]> wrote:

> In the regular expression? Yes, that didn't have any effect.
>
> Jeni
>
> On 20 Jul 2009, at 15:04, Ethan Gruber wrote:
>
>> Have you tried escaping the semicolon?  e. g.
>>
>> \;
>>
>> Ethan
>>
>> On Mon, Jul 20, 2009 at 8:54 AM, Jeni Tennison <[hidden email]>
>> wrote:
>> Hi,
>>
>> I have a requirement to support URIs such as:
>>
>>  http://www.example.com/ukpga/1985/67/england;wales
>>
>> and want to parse the URI within the page flow with the regular expression
>> like:
>>
>>
>>  /([^/]+)/([0-9]{4})/([0-9]{2})/((england|wales|scotland|ni)(;(england|wales|scotland|ni))*)
>>
>> It appears that the page flow is only allowing me to process the URI up
>> until the semi-colon. Anything past that isn't included in the values of
>> parameters.
>>
>> How can I process the URI including the text after the semicolon?
>>
>> Jeni
>> --
>> Jeni Tennison
>> http://www.jenitennison.com
>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing
>> list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
> --
> Jeni Tennison
> http://www.jenitennison.com
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws