2.5. Parsing a property with an absolute value

Property values are parsed in PropertyParser.parseProperty:

  [1] org.apache.fop.fo.expr.PropertyParser.parseProperty (PropertyParser.java:111)
  [2] org.apache.fop.fo.expr.PropertyParser.parse (PropertyParser.java:88)
  [3] org.apache.fop.fo.properties.PropertyMaker.make (PropertyMaker.java:389)
  [4] org.apache.fop.fo.PropertyList.convertAttributeToProperty (PropertyList.java:418)
  [5] org.apache.fop.fo.PropertyList.addAttributesToList (PropertyList.java:374)
  [6] org.apache.fop.fo.FObj.addProperties (FObj.java:133)

Example: <fo:simple-page-master master-name="simpleA4" margin="4pt">, property being parsed: margin="4pt", propId = 134.

The PropertyParser object:

 this = "org.apache.fop.fo.expr.PropertyParser@8530b8"
 this = {
    propInfo: instance of org.apache.fop.fo.expr.PropertyInfo(id=729)
    org.apache.fop.fo.expr.PropertyTokenizer.currentToken: 0
    org.apache.fop.fo.expr.PropertyTokenizer.currentTokenValue: null
    org.apache.fop.fo.expr.PropertyTokenizer.currentUnitLength: 0
    org.apache.fop.fo.expr.PropertyTokenizer.currentTokenStartIndex: 0
    org.apache.fop.fo.expr.PropertyTokenizer.expr: "4pt"
    org.apache.fop.fo.expr.PropertyTokenizer.exprIndex: 0
    org.apache.fop.fo.expr.PropertyTokenizer.exprLength: 3
    org.apache.fop.fo.expr.PropertyTokenizer.recognizeOperator: false
}

It has a member of type PropertyInfo, which contains contextual information:

 propInfo = "org.apache.fop.fo.expr.PropertyInfo@1abcc03"
 propInfo = {
    maker: instance of org.apache.fop.fo.properties.ListProperty$Maker(id=705)
    plist: instance of org.apache.fop.fo.PropertyList(id=737)
    fo: instance of org.apache.fop.fo.pagination.LayoutMasterSet(id=738)
    stkFunction: null
}

fo is the parent FO.

The property list of the current FO node:

 propInfo.plist = {
    writingModeTable: null
    writingMode: 0
    inheritableProperty: null
    parentPropertyList: instance of org.apache.fop.fo.PropertyList(id=743)
    namespace: "http://www.w3.org/1999/XSL/Format"
    elementName: "fo:simple-page-master"
    fobj: instance of org.apache.fop.fo.pagination.SimplePageMaster(id=746)
}

The property list up to now:

 propInfo.plist = "{master-name=simpleA4}"

Property master-name's maker is StringPropertyMaker, which does not parse its value.

PropertyParser.parseProperty

Return the property: p = "4000mpt".