if ( DoxiaUtils.isExternalLink( name ) ) else if ( DoxiaUtils.isInternalLink( name ) ) if ( !DoxiaUtils.isValidId( anchor ) ) anchor = DoxiaUtils.encodeId( anchor, true );
+ DoxiaUtils.encodeId(anchor, true)); sink.text(testElement); sink.link_();
/** * {@inheritDoc} * @see SimplifiedDocbookMarkup#ULINK_TAG * @see SimplifiedDocbookMarkup#URL_ATTRIBUTE * @see SimplifiedDocbookMarkup#LINK_TAG * @see SimplifiedDocbookMarkup#LINKEND_ATTRIBUTE */ public void link( String name ) { if ( name == null ) { throw new NullPointerException( "Link name cannot be null!" ); } if ( DoxiaUtils.isInternalLink( name ) ) { String linkend = name.substring( 1 ); MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( SimplifiedDocbookMarkup.LINKEND_ATTRIBUTE, HtmlTools.escapeHTML( linkend ) ); writeStartTag( SimplifiedDocbookMarkup.LINK_TAG, att ); } else { externalLinkFlag = true; MutableAttributeSet att = new SimpleAttributeSet(); att.addAttribute( SimplifiedDocbookMarkup.URL_ATTRIBUTE, HtmlTools.escapeHTML( name, true ) ); writeStartTag( SimplifiedDocbookMarkup.ULINK_TAG, att ); } }
private SinkEventAttributeSet getGraphicsAttributes( String logo ) { MutableAttributeSet atts = null; try { atts = DoxiaUtils.getImageAttributes( logo ); } catch ( IOException e ) { getLog().debug( e ); } if ( atts == null ) { return new SinkEventAttributeSet( new String[]{ SinkEventAttributes.HEIGHT, COVER_HEADER_HEIGHT } ); } // FOP dpi: 72 // Max width : 3.125 inch, table cell size, see #coverPage() final int maxWidth = 225; // 3.125 * 72 if ( Integer.parseInt( atts.getAttribute( SinkEventAttributes.WIDTH ).toString() ) > maxWidth ) { atts.addAttribute( "content-width", "3.125in" ); } return new SinkEventAttributeSet( atts ); } }
if ( DoxiaUtils.isExternalLink( name ) ) if ( DoxiaUtils.isInternalLink( name ) ) if ( !DoxiaUtils.isValidId( anchor ) ) anchor = DoxiaUtils.encodeId( anchor, 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 ); }
+ parser.getLineNumber() + ":" + parser.getColumnNumber() + ")" ); else if ( !DoxiaUtils.isValidId( currentPart.getId() ) ) String linkAnchor = DoxiaUtils.encodeId( currentPart.getId(), true ); + parser.getLineNumber() + ":" + parser.getColumnNumber() + ")" ); else if ( !DoxiaUtils.isValidId( currentFaq.getId() ) ) String linkAnchor = DoxiaUtils.encodeId( currentFaq.getId(), true );