XML Script logo
Complex SCS with sub-content lookup
Code
<L1A >
  <i >no name</i>
  <i name="-" >name no good</i>
  <i >.name== of SCS not satisfied here<complex >YES!</complex></i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
  <i name="-" >name no good</i>
  <i >.name== part of SCS not satisfied here<complex >YES!</complex></i>
  <i name="-" >name no good</i>
  <i name="test" >complex== part of SCS not satisfied here</i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
  <i name="test" >Sub-content lookup error<complex test="A" >YES!</complex></i>
  <i name="test" >complex== part of SCS not satisfied here</i>
  <i name="test" >Sub-content lookup error<complex test="B" >YES!</complex></i>
  <i name="test" >Sub-content lookup error<complex test="C" >YES!</complex></i>
  <i name="test" >Sub-content lookup error<complex test="D" >YES!</complex></i>
  <i name="test" >complex== part of SCS not satisfied here</i>
  <i name="-" >name no good</i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
  <i name="-" >name no good</i>
  <i >.name== part of SCS not satisfied here<complex >YES!</complex></i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
  <i name="-" >name no good</i>
  <i name="test" >complex== part of SCS not satisfied here</i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
  <i name="test" >Sub-content lookup error<complex test="E" >YES!</complex></i>
  <i name="test" >Sub-content lookup error<complex test="F" >YES!</complex></i>
  <i name="test" >Sub-content lookup error<complex test="G" >YES!</complex></i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
</L1A>

# join( $L1A\i{(.name == "test") and (complex == "YES!")}[3~6]\complex.test, '') #
# join( $L1A\i{(.name == "test") and (complex == "YES!")}[3~6,10~12]\complex.test, '') #
# join( $L1A\i{(.name == "test") and (complex == "YES!")}[12,3~4,6,5,10~11]\complex.test, '') #
Output
<L1A >
  <i >no name</i>
  <i name="-" >name no good</i>
  <i >.name== of SCS not satisfied here<complex >YES!</complex></i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
  <i name="-" >name no good</i>
  <i >.name== part of SCS not satisfied here<complex >YES!</complex></i>
  <i name="-" >name no good</i>
  <i name="test" >complex== part of SCS not satisfied here</i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
  <i name="test" >Sub-content lookup error<complex test="A" >YES!</complex></i>
  <i name="test" >complex== part of SCS not satisfied here</i>
  <i name="test" >Sub-content lookup error<complex test="B" >YES!</complex></i>
  <i name="test" >Sub-content lookup error<complex test="C" >YES!</complex></i>
  <i name="test" >Sub-content lookup error<complex test="D" >YES!</complex></i>
  <i name="test" >complex== part of SCS not satisfied here</i>
  <i name="-" >name no good</i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
  <i name="-" >name no good</i>
  <i >.name== part of SCS not satisfied here<complex >YES!</complex></i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
  <i name="-" >name no good</i>
  <i name="test" >complex== part of SCS not satisfied here</i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
  <i name="test" >Sub-content lookup error<complex test="E" >YES!</complex></i>
  <i name="test" >Sub-content lookup error<complex test="F" >YES!</complex></i>
  <i name="test" >Sub-content lookup error<complex test="G" >YES!</complex></i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
  <i name="test" >SLICE ERROR<complex >YES!</complex></i>
</L1A>

ABCD
ABCDEFG
ABCDEFG
Ref

x.3204

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited