StreamPipeline pipeline = sitemap.getStreamPipeline();
EventPipeline eventPipeline = pipeline.getEventPipeline();
// Get the element for the top level element
String src = "";
Value ssrc = assq(sargs, Symbol.get("src"));
if (!ssrc.eq(FALSE))
src = string(pair(ssrc).cdr);
else
throw new RuntimeException("No 'src' attribute specified for <part>!");
// Get the element for the top level element
String element = "";
Value selement = assq(sargs, Symbol.get("element"));
if (!selement.eq(FALSE))
element = string(pair(selement).cdr);
// Get the namespace for the top level element
String ns = "";
Value sns = assq(sargs, Symbol.get("ns"));
if (!sns.eq(FALSE))
ns = string(pair(sns).cdr);
// Get the prefix for the top level element
String prefix = "";
Value sprefix = assq(sargs, Symbol.get("prefix"));
if (!sprefix.eq(FALSE))
prefix = string(pair(sprefix).cdr);
// Whether to strip the root element of the document from src
String stripRoot = "";
Value sstripRoot = assq(sargs, Symbol.get("strip-root"));
if (!sstripRoot.eq(FALSE))
stripRoot = string(pair(sstripRoot).cdr);
ContentAggregator contentAggregator
= (ContentAggregator)eventPipeline.getGenerator();
contentAggregator.addPart(src, element, ns, stripRoot, prefix);