protected void checkAndAddListInjections ( final BuildData buildData , final Document doc , final ITopicNode topicNode , final Map < String , TranslationDetails > translations ) { final DocBookXMLPreProcessor preProcessor = buildData . getXMLPreProcessor ( ) ; final List < Integer > types = Arrays . asList ( DocBookXMLPreProcessor . ORDEREDLIST_INJECTION_POINT , DocBookXMLPreProcessor . ITEMIZEDLIST_INJECTION_POINT , DocBookXMLPreProcessor . LIST_INJECTION_POINT ) ; final HashMap < org . w3c . dom . Node , InjectionListData > customInjections = new HashMap < org . w3c . dom . Node , InjectionListData > ( ) ; preProcessor . collectInjectionData ( buildData . getContentSpec ( ) , topicNode , new ArrayList < String > ( ) , doc , buildData . getBuildDatabase ( ) , new ArrayList < String > ( ) , customInjections , buildData . isUseFixedUrls ( ) , types ) ; // Now convert the custom injection points for ( final org . w3c . dom . Node customInjectionCommentNode : customInjections . keySet ( ) ) { final InjectionListData injectionListData = customInjections . get ( customInjectionCommentNode ) ; /* * this may not be true if we are not building all related topics */ if ( injectionListData . listItems . size ( ) != 0 ) { for ( final List < Element > elements : injectionListData . listItems ) { final Element para = doc . createElement ( "para" ) ; for ( final Element element : elements ) { para . appendChild ( element ) ; } final String translationString = XMLUtilities . convertNodeToString ( para , false ) ; translations . put ( translationString , new TranslationDetails ( translationString , false , "para" ) ) ; } } } }
Checks to see if any list injections have been used and if so adds the translation xrefs .