private static String toHtmlId( String id ) { return DoxiaUtils.isValidId( id ) ? id : DoxiaUtils.encodeId( id, true ); }
private static String toHtmlId( String id ) { return DoxiaUtils.isValidId( id ) ? id : DoxiaUtils.encodeId( id, true ); }
/** {@inheritDoc} */ public void anchor( String name, SinkEventAttributes attributes ) { if ( name == null ) { throw new NullPointerException( "Anchor name cannot be null!" ); } String anchor = name; if ( !DoxiaUtils.isValidId( anchor ) ) { anchor = DoxiaUtils.encodeId( name, true ); String msg = "Modified invalid anchor name: '" + name + "' to '" + anchor + "'"; logMessage( "modifiedLink", msg ); } anchor = "#" + name; writeStartTag( INLINE_TAG, "id", anchor ); }
/** * {@inheritDoc} */ public void anchor( String name, SinkEventAttributes attributes ) { if ( name == null ) { throw new NullPointerException( "Anchor name cannot be null!" ); } String anchor = name; if ( !DoxiaUtils.isValidId( anchor ) ) { anchor = DoxiaUtils.encodeId( name, true ); String msg = "Modified invalid anchor name: '" + name + "' to '" + anchor + "'"; logMessage( "modifiedLink", msg ); } anchor = "#" + anchor; if ( docName != null ) { anchor = docName + anchor; } writeStartTag( INLINE_TAG, "id", anchor ); }
/** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ANCHOR_TAG */ public void anchor( String name ) { if ( name == null ) { throw new NullPointerException( "Anchor name cannot be null!" ); } if ( authorDateFlag ) { return; } String id = name; if ( !DoxiaUtils.isValidId( id ) ) { id = DoxiaUtils.encodeId( name, true ); String msg = "Modified invalid anchor name: '" + name + "' to '" + id + "'"; logMessage( "modifiedLink", msg ); } MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( ID_ATTRIBUTE, id ); writeSimpleTag( SimplifiedDocbookMarkup.ANCHOR_TAG, att ); }
if ( !DoxiaUtils.isValidId( anchor ) )
if ( !DoxiaUtils.isValidId( anchor ) )