aXSL

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

The aXSL FoTree Module

Contents

Introduction

The FoTree module provides client access to the relevant parts of a refined FO Tree, as defined by the XSL-FO Recommendation (see Exceptions below. Because the refined tree is exposed, the methods that return property values include the term "trait" in their names. Not all objects and properties are exposed in the API, because some of them are needed only for internal FO Tree purposes (see below for details). Implementations of axslFoTree typically parse an input file or stream to create the FO Tree content.

Contract

In addition to compliance with the published API, implementations are expected to fully validate the input data. This means that an FoTreeException should be thrown for any data that does not conform to the data model specified in the standard, or that is identified as an error in the standard. For example, the standard indicates that a table-cell content model is "(%block;)+". An exception should be thrown if children are presented that do not conform to this model. The standard also specifies that "It is an error if two or more table-cells overlap ..." (XSL-FO 1.1, Section 6.7.3". An exception should be thrown if they do, or the remedial steps specified near this statement should be implemented within the FO Tree itself.

In addition to these validation steps, the FO Tree is required to normalize the following items:

  • table-cells that are children of table-header, table-footer, or table-body instead of table-row should be normalized by adding a "pseudo" table-row as their parent.

The purpose of the validation and normalization specified above is to allow client applications such as AreaTrees and Layout systems to rely on certain assumptions about the validity and structure of the FO Tree.

Exceptions

There are a few places where the aXSL API deviates from the XSL-FO 1.1 Recommendation:

  • The Recommendation indicates that white-space-collapse should be handled during area tree construction instead of FO Tree refinement. We currently think that it can and should be handled during FO Tree refinement instead, and therefore have not exposed this trait in the API. aXSL FoTree implementations are required to return a "refined FO Tree" that has already processed this property. We have asked the XSL-FO Working Group for clarification, and this issue may be revisited in the future, depending on their response.
  • The Recommendation indicates that white-space-treatment should be handled during area tree construction instead of FO Tree refinement. aXSL FoTree implementations are required to process the "ignore" value within the FO Tree. The remaining values must be processed during area construction.
  • The Recommendation indicates that text-transform should be handled during FO Tree refinement. This is not possible when this property is applied to the initial-property-set object. The aXSL API therefore exposes a method for this trait for the initial-property-set object.

Missing Interfaces?

There are several pagination-related XSL-FO objects that do not have corresponding interfaces in the aXSL FoTree. It is not that these are unimportant, but rather that their operation is entirely internal to the FO Tree. Client applications only need to know what fo:simple-page-master they should use, so the "details" of these objects are hidden from the client applications:

  • fo:layout-master-set
  • fo:page-sequence-master
  • fo:single-page-master-reference
  • fo:repeatable-page-master-reference
  • fo:repeatable-page-master-alternatives
  • fo:conditional-page-master-reference

Similarly, the following flow-map related objects do not have corresponding interfaces in aXSL. Instead, the substantive information contained in these objects is exposed in methods found in PageSequence (which returns a list of Flows), SimplePageMaster (which returns a list of region-body instances and can return region-body instances when given their names), and Flow (which returns a list of region-body names into which the flow should be laid out):

  • fo:flow-map
  • fo:flow-assignment
  • fo:flow-source-list
  • fo:flow-name-specifier
  • fo:flow-target-list
  • fo:region-name-specifier

Missing Traits?

The table below is a comprehensive list of all XSL-FO 1.1 properties, and indicating either that a method exists to obtain the value of that property, or an explanation of why such a method does not exist. Note that the application must still be able to parse all of these properties. What is documented here is which properties are exposed to client applications.

Property Name Location of Method
absolute-positionCommonAbsolutePositionPa
active-stateActiveStatePa
alignment-adjustAlignmentAdjustPa
alignment-baselineAlignmentBaselinePa
allowed-height-scaleAllowedHeightScalePa
allowed-width-scaleAllowedWidthScalePa
auto-restoreAutoRestorePa
azimuthCommonAuralPa
backgroundNo. Shorthand property is normalized into its components.
background-attachmentCommonBorderPaddingBgPa
background-colorCommonBorderPaddingBgPa
background-imageCommonBorderPaddingBgPa
background-positionNo. Shorthand property is normalized into its components.
background-position-horizontalCommonBorderPaddingBgPa
background-position-verticalCommonBorderPaddingBgPa
background-repeatCommonBorderPaddingBgPa
baseline-shiftBaselineShiftPa
blank-or-not-blankNo. Applies only to fo:conditional-page-master-reference which is not exposed in this API.
block-progression-dimension3 methods in BlockProgressionDimensionPa.
borderNo. Shorthand property is normalized into its components.
border-after-colorCommonBorderPaddingBgPa
border-after-precedenceBorderAfterPrecedencePa
border-after-styleCommonBorderPaddingBgPa
border-after-widthCommonBorderPaddingBgPa
border-before-colorCommonBorderPaddingBgPa
border-before-precedenceBorderBeforePrecedencePa
border-before-styleCommonBorderPaddingBgPa
border-before-widthCommonBorderPaddingBgPa
border-bottomNo. Shorthand property is normalized into its components.
border-bottom-colorNo. Use relative equivalent instead.
border-bottom-styleNo. Use relative equivalent instead.
border-bottom-widthNo. Use relative equivalent instead.
border-collapseBorderCollapsePa
border-colorNo. Shorthand property is normalized into its components.
border-end-colorCommonBorderPaddingBgPa
border-end-precedenceBorderEndPrecedencePa
border-end-styleCommonBorderPaddingBgPa
border-end-widthCommonBorderPaddingBgPa
border-leftNo. Shorthand property is normalized into its components.
border-left-colorNo. Use relative equivalent instead.
border-left-styleNo. Use relative equivalent instead.
border-left-widthNo. Use relative equivalent instead.
border-rightNo. Shorthand property is normalized into its components.
border-right-colorNo. Use relative equivalent instead.
border-right-styleNo. Use relative equivalent instead.
border-right-widthNo. Use relative equivalent instead.
border-separationBorderSeparationPa
border-spacingNo. Shorthand property is normalized into its components.
border-start-colorCommonBorderPaddingBgPa
border-start-precedenceBorderStartPrecedencePa
border-start-styleCommonBorderPaddingBgPa
border-start-widthCommonBorderPaddingBgPa
border-styleNo. Shorthand property is normalized into its components.
border-topNo. Shorthand property is normalized into its components.
border-top-colorNo. Use relative equivalent instead.
border-top-styleNo. Use relative equivalent instead.
border-top-widthNo. Use relative equivalent instead.
border-widthNo. Shorthand property is normalized into its components.
bottomCommonAbsolutePositionPa
break-afterBreakAfterPa
break-beforeBreakBeforePa
caption-sideCaptionSidePa
case-nameCaseNamePa
case-titleCaseTitlePa
change-bar-classChangeBarClassPa
change-bar-colorChangeBarColorPa
change-bar-offsetChangeBarOffsetPa
change-bar-placementChangeBarPlacementPa
change-bar-styleChangeBarStylePa
change-bar-widthChangeBarWidthPa
characterCharacterPa
clearClearPa
clipClipPa
colorColorPa
color-profile-nameColorProfileNamePa
column-countColumnCountPa
column-gapColumnGapPa
column-numberColumnNumberPa
column-widthColumnWidthPa
content-heightNo. Used as a factor in FoScaled methods referenceIpd and referenceBpd.
content-typeContentTypePa
content-widthNo. Used as a factor in FoScaled methods referenceIpd and referenceBpd.
countryCommonHyphenationPa
cueNo. Shorthand property is normalized into its components.
cue-afterCommonAuralPa
cue-beforeCommonAuralPa
destination-placement-offsetDestinationPlacementOffsetPa
directionDirectionPa
display-alignDisplayAlignPa
dominant-baselineDominantBaselinePa
elevationCommonAuralPa
empty-cellsEmptyCellsPa
end-indentCommonMarginBlockPa
ends-rowNo. aXSL FoTree implementations are required to normalize table content to contain table-rows.
extentExtentPa
external-destinationNormalized to methods found in DestinationPa
floatFloatPa
flow-map-nameNo. Internal to the implementation.
flow-map-referenceNo. Internal to the implementation.
flow-nameFlowNamePa
flow-name-referenceNo. Internal to the implementation.
fontNo. Shorthand property is normalized into its components.
font-familyNo. Used as a factor in the getPrimaryFont and getSecondaryFont methods in CommonFontPa.
font-selection-strategyNo. Used as a factor in the getPrimaryFont and getSecondaryFont methods in CommonFontPa.
font-sizeNot directly. Used as a factor in the traitFontSizeActual method in CommonFontPa.
font-size-adjustNo. Used as a factor in the traitFontSizeActual method in CommonFontPa.
font-stretchNo. Used as a factor in the getPrimaryFont and getSecondaryFont methods in CommonFontPa.
font-styleNot exposed for font-selection purposes. Used as a factor in the getPrimaryFont and getSecondaryFont methods in CommonFontPa. It is exposed for bookmark-title.
font-variantNo. Used as a factor in the getPrimaryFont and getSecondaryFont methods in CommonFontPa.
font-weightNot exposed for font-selection purposes. Used as a factor in the getPrimaryFont and getSecondaryFont methods in CommonFontPa. It is exposed for bookmark-title.
force-page-countForcePageCountPa
formatFormatPa (After Release 0.2) for PageSequence. Not exposed for ScalingValueCitation.
glyph-orientation-horizontalGlyphOrientationHorizontalPa
glyph-orientation-verticalGlyphOrientationVerticalPa
grouping-separatorNo. Internal to the implementation.
grouping-sizeNo. Internal to the implementation.
heightNo. Normalizes to block-progression-dimension.
hyphenateCommonHyphenationPa
hyphenation-characterCommonHyphenationPa
hyphenation-keepHyphenationKeepPa
hyphenation-ladder-countHyphenationLadderCountPa
hyphenation-push-character-countCommonHyphenationPa
hyphenation-remain-character-countCommonHyphenationPa
idIdPa
index-classIndexClassPa
index-keyIndexKeyPa
indicate-destinationIndicateDestinationPa
initial-page-numberInitialPageNumberPa
inline-progression-dimension3 methods in InlineProgressionDimensionPa
internal-destinationNormalized to methods found in DestinationPa
intrinsic-scale-valueInternal to the implementation. Used in the computation of getAppliedScaleFactorString in ScalingValueCitation.
intrusion-displaceIntrusionDisplacePa
keep-together3 methods in KeepTogetherPa.
keep-with-next3 methods in KeepWithNextPa.
keep-with-previous3 methods in KeepWithPreviousPa.
languageCommonHyphenationPa
last-line-end-indentLastLineEndIndentPa
leader-alignmentLeaderAlignmentPa
leader-length3 methods in LeaderLengthPa.
leader-patternLeaderPatternPa
leader-pattern-widthLeaderPatternWidthPa
leftCommonAbsolutePositionPa
letter-spacing5 methods in LetterSpacingPa.
letter-valueNo. Internal to the implementation.
linefeed-treatmentNo. The operations of this property are completely internal to the FO Tree.
line-heightIndirectly found in the half-leading traits found in LineHeightPa.
line-height-shift-adjustmentLineHeightShiftAdjustmentPa
line-stacking-strategyLineStackingStrategyPa
marginNo. Shorthand property is normalized into its components.
margin-bottomNo. Absolute-direction property is normalized to its relative-direction equivalent (space-after, space-before, etc.)
margin-leftNo. Absolute-direction property is normalized to its relative-direction equivalent (space-after, space-before, etc.)
margin-rightNo. Absolute-direction property is normalized to its relative-direction equivalent (space-after, space-before, etc.)
margin-topNo. Absolute-direction property is normalized to its relative-direction equivalent (space-after, space-before, etc.)
marker-class-nameMarkerClassNamePa
master-nameNo. Internal to the implementation.
master-referenceInternal to the implementation. Used in the selection of page masters.
max-heightNo. Normalized to either inline-progression-dimension or block-progression-dimension.
maximum-repeatsInternal to the implementation. Used in the selection of page masters.
max-widthNo. Normalized to either inline-progression-dimension or block-progression-dimension.
media-usageMediaUsagePa
merge-pages-across-index-key-referencesMergePagesAcrossIndexKeyReferencesPa
merge-ranges-across-index-key-referencesMergeRangesAcrossIndexKeyReferencesPa
merge-sequential-page-numbersMergeSequentialPageNumbersPa
min-heightNo. Normalized to either inline-progression-dimension or block-progression-dimension.
min-widthNo. Normalized to either inline-progression-dimension or block-progression-dimension.
number-columns-repeatedNumberColumnsRepeatedPa
number-columns-spannedNumberColumnsSpannedPa
number-rows-spannedNumberRowsSpannedPa
odd-or-evenNo. Internal to the implementation.
orphansOrphansPa
overflowOverflowPa
paddingNo. Shorthand property is normalized into its components.
padding-afterCommonBorderPaddingBgPa
padding-beforeCommonBorderPaddingBgPa
padding-bottomNo. Use relative equivalent instead.
padding-endCommonBorderPaddingBgPa
padding-leftNo. Use relative equivalent instead.
padding-rightNo. Use relative equivalent instead.
padding-startCommonBorderPaddingBgPa
padding-topNo. Use relative equivalent instead.
page-break-afterNo. Shorthand property is normalized into its components.
page-break-beforeNo. Shorthand property is normalized into its components.
page-break-insideNo. Shorthand property is normalized into its components.
page-citation-strategyPageCitationStrategyPa
page-heightPageHeightPa
page-number-treatmentPageNumberTreatmentPa
page-positionNo. Internal to implementation.
page-widthPageWidthPa
pauseNo. Shorthand property is normalized into its components.
pause-afterCommonAuralPa
pause-beforeCommonAuralPa
pitchCommonAuralPa
pitch-rangeCommonAuralPa
play-duringCommonAuralPa
positionNo. Shorthand property is normalized into its components.
precedenceInternal to the implementation. Used in the computation of the returned dimensions of the various page regions.
provisional-distance-between-startsProvisionalDistanceBetweenStartsPa
provisional-label-separationProvisionalLabelSeparationPa
reference-orientationReferenceOrientationPa
ref-idRefIdPa
ref-index-keyRefIndexKeyPa
region-nameRegionNamePa
region-name-referenceNo. Internal to the implementation.
relative-alignRelativeAlignPa
relative-positionCommonRelativePositionPa
rendering-intentRenderingIntentPa
retrieve-boundaryRetrieveBoundaryPa
retrieve-boundary-within-tableRetrieveBoundaryWithinTablePa
retrieve-class-nameRetrieveClassNamePa
retrieve-positionRetrievePositionPa
retrieve-position-within-tableRetrievePositionWithinTablePa
richnessCommonAuralPa
rightCommonAbsolutePositionPa
roleCommonAccessibilityPa
rule-styleRuleStylePa
rule-thicknessRuleThicknessPa
scale-optionInternal to the implementation. Used in the computation of getAppliedScaleFactorString in ScalingValueCitation.
scalingNo. Used as a factor in FoScaled methods referenceIpd and referenceBpd.
scaling-methodScalingMethodPa
score-spacesScoreSpacesPa
scriptCommonHyphenationPa
show-destinationShowDestinationPa
sizeNo. Shorthand property is normalized into its components.
source-documentCommonAccessibilityPa
space-after5 methods in CommonMarginBlockPa.
space-before5 methods in CommonMarginBlockPa.
space-end4 methods in CommonMarginInlinePa, and one method in CommonMarginInlineOptimumPa.
space-start4 methods in CommonMarginInlinePa, and one method in CommonMarginInlineOptimumPa.
spanSpanPa
speakCommonAuralPa
speak-headerCommonAuralPa
speak-numeralCommonAuralPa
speak-punctuationCommonAuralPa
speech-rateCommonAuralPa
srcSrcPa
start-indentCommonMarginBlockPa
starting-stateStartingStatePa
starts-rowNo. aXSL FoTree implementations are required to normalize table content to contain table-rows.
stressCommonAuralPa
suppress-at-line-breakSuppressAtLineBreakPa
switch-toSwitchToPa
table-layoutTableLayoutPa
table-omit-footer-at-breakTableOmitFooterAtBreakPa
table-omit-header-at-breakTableOmitHeaderAtBreakPa
target-presentation-contextTargetPresentationContextPa
target-processing-contextTargetProcessingContextPa
target-stylesheetTargetStylesheetPa
text-alignTextAlignPa
text-align-lastTextAlignLastPa
text-altitudeTextAltitudePa
text-decoration7 methods in TextDecorationPa
text-depthTextDepthPa
text-indentTextIndentPa
text-shadowTextShadowPa
text-transformTexTransformPa, but it is only available to the initial-property-set object. Exposure of this property is an Exception to the XSL-FO 1.1 Recommendation.
topCommonAbsolutePositionPa
treat-as-word-spaceTreatAsWordSpacePa
unicode-bidiUnicodeBidiPa
vertical-alignNo. Shorthand property is normalized into its components.
visibilityVisibilityPa
voice-familyCommonAuralPa
volumeCommonAuralPa
white-spaceNo. Shorthand property is normalized into its components.
white-space-collapseNo. The processing of this property is internal to the FO Tree. The failure to expose this property is an Exception to the XSL-FO 1.1 Recommendation.
white-space-treatmentWhiteSpaceTreatmentPa
widowsWidowsPa
widthNo. Normalizes to inline-progression-dimension.
word-spacing5 methods in WordSpacingPa.
wrap-optionWrapOptionPa
writing-modeWritingModePa
xml:langNo. Shorthand property is normalized into its components.
z-indexZIndexPa

Known Implementations

The known implementations of axslFoTree are:

Reference Applications

Reference applications contain working code that uses axslFoTree: