{
xdocParser.parse( faq.getQuestion(), sink );
}
else
{
throw new ParseException( "Missing <question> for FAQ '" + faq.getId() + "'" );
}
sink.link_();
sink.numberedListItem_();
}
sink.numberedList_();
}
sink.section1_();
// ----------------------------------------------------------------------
// Write content
// ----------------------------------------------------------------------
for ( Part part : faqs.getParts() )
{
if ( StringUtils.isNotEmpty( part.getTitle() ) )
{
sink.section1();
sink.sectionTitle1();
xdocParser.parse( part.getTitle(), sink );
sink.sectionTitle1_();
}
sink.definitionList();
for ( Iterator<Faq> faqIterator = part.getFaqs().iterator(); faqIterator.hasNext(); )
{
Faq faq = faqIterator.next();
sink.definedTerm();
sink.anchor( faq.getId() );
if ( StringUtils.isNotEmpty( faq.getQuestion() ) )
{
xdocParser.parse( faq.getQuestion(), sink );
}
else
{
throw new ParseException( "Missing <question> for FAQ '" + faq.getId() + "'" );
}
sink.anchor_();
sink.definedTerm_();
sink.definition();
if ( StringUtils.isNotEmpty( faq.getAnswer() ) )
{
xdocParser.parse( faq.getAnswer(), sink );
}
else
{
throw new ParseException( "Missing <answer> for FAQ '" + faq.getId() + "'" );
}
if ( faqs.isToplink() )
{
writeTopLink( sink );