Topic - fragments in rewrites
Topic - fragments in rewrites Topic - fragments in rewrites
from forum Component Developer
 forum index   my profile   search 
 new topic  post reply 
moderators: pjr tab
fragments in rewrites
Joined: 5-December-2007
Posts: 28
Posted: 15-July-2008 20:14
Is there a problem when using fragments on the "to" uri of an internal rewrite?

For example, if I add the following rewrite to the top of the mapping section in the workbench module, the fragment part of the rewritten uri seems to be ignored and I just get the whole xml document (entrypoints.xml) back:

   <rewrite>
     <match>ffcpl:/rewrite/to/fragment</match>
     <to>ffcpl:/entrypoints.xml#xpointer(/entrypoints/entrypoint/name)</to>
   </rewrite>


I expected to get just the "name" element back. 

I'm using the resource request trace tool to inject the internal request ffcpl:/rewrite/to/fragment.

On the other hand if I restart NK and request the rewritten uri directly via the request tool, I just get the name element as expected, instead of the whole document.  But if I've already run the <from/> request then the rewritten request also just gives me the whole document, presumably because it found it in cache.

Bug?
Yep, a bug
Joined: 7-February-2005
Posts: 249
Location: Uncharted territory
Posted: 15-July-2008 22:53
Yes that sounds like a bug, well spotted! I suspect the fragment isn't getting treated consistently if it is added by a rewrite part way through the resolution process of the module. Please could you raise a bug on bugxter. Cheers.

Best solution/workaround is to put the fragmentation operation into a simple DPML script and rewrite to the script. That should do the trick.

Tony
fragments in rewrites - submitted to bugster
Joined: 5-December-2007
Posts: 28
Posted: 16-July-2008 15:56
submitted - bugster id is 148.
Thx
 new topic  post reply  To find out about new replies to this post as they occur
please subscribe to one of these feeds:
AtomRSS moderate 
© 2003-2006, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.