protected String createTopicXMLFile ( final BuildData buildData , final SpecTopic specTopic , final String parentFileLocation ) throws BuildProcessingException { String topicFileName ; final BaseTopicWrapper < ? > topic = specTopic . getTopic ( ) ; if ( topic != null ) { topicFileName = specTopic . getUniqueLinkId ( buildData . isUseFixedUrls ( ) ) + ".xml" ; final String fixedParentFileLocation = buildData . getBuildOptions ( ) . getFlattenTopics ( ) ? buildData . getBookTopicsFolder ( ) : parentFileLocation ; final String fixedEntityPath = fixedParentFileLocation . replace ( buildData . getBookLocaleFolder ( ) , "" ) . replaceAll ( ".*?" + File . separator + "" , "../" ) ; final String topicXML = DocBookBuildUtilities . convertDocumentToDocBookFormattedString ( buildData . getDocBookVersion ( ) , specTopic . getXMLDocument ( ) , DocBookUtilities . TOPIC_ROOT_NODE_NAME , fixedEntityPath + buildData . getEntityFileName ( ) , getXMLFormatProperties ( ) ) ; addToZip ( fixedParentFileLocation + topicFileName , topicXML , buildData ) ; return topicFileName ; } return null ; }
Creates the Topic component of a chapter . xml for a specific SpecTopic .