So.. this is my xml:

<Show>
 <name>House</name>
 <totalseasons>8</totalseasons>
 <Episodelist>
  <Season no="1">
   <episode>
     <epnum>1</epnum>
     <seasonnum>01</seasonnum>
     <prodnum>HOU-101</prodnum>
   </episode>
   <episode>
     <epnum>2</epnum>
     <seasonnum>02</seasonnum>
     <prodnum>HOU-105</prodnum>
   </episode>
  </Season>

My context is //episde
I want to create node for each episode. But when I use: /Show/Episodelist/Seaosn/@no for season field it return only first value (in this case 1 ) for all nodes.

Comments

yavor’s picture

Title: Get filed info above Context » Get filed info above Context - Solvet

Sorry for the issue Solvet

elliotttf’s picture

+1 I would also be interested in being able to grab fields from outside the current context. Perhaps I'm not thinking about the problem the right way, but being able to directly query a field or use something like "../field" would be helpful here.

twistor’s picture

Something like:
../Season/@no

elliotttf’s picture

Yeah, that's what I was thinking, but because the code removes the rest of the document there would have to be some tweaking to give queries access to the content outside of the context query.

twistor’s picture

Assigned: yavor » Unassigned
Issue summary: View changes
Status: Active » Closed (fixed)

This was fixed a long time ago.