<?xml version="1.0"?>

<!-- Copyright the Omegahat Project for Statistical Computing, 2000 -->
<!-- Author: Duncan Temple Lang -->

<!DOCTYPE scode [
  <!ENTITY sgets "&lt;-">
]>

<scode>
<function lang="S">
xml2tex &sgets;
function(node, mappings=.XMLTexMappings) {
   n &sgets; 10
   x &sgets; <fragmentRef id="frag1" />
   print(x+10)
   x
   <myFrag />
}
</function>

<fragment id="frag1">
 seq(1,n)
 <fragmentRef id="frag2" />
</fragment>

<fragment id="frag2">
 + 10
</fragment>

<myFrag>
 My fragment
</myFrag>
</scode>
