|
|
@@ -264,6 +264,13 @@ public abstract class PropertyList { |
|
|
|
return -1; |
|
|
|
} |
|
|
|
|
|
|
|
private String addAttributeToList(Attributes attributes, |
|
|
|
String attributeName) throws ValidationException { |
|
|
|
String attributeValue = attributes.getValue(attributeName); |
|
|
|
convertAttributeToProperty(attributes, attributeName, attributeValue); |
|
|
|
return attributeValue; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Adds the attributes, passed in by the parser to the PropertyList |
|
|
|
* |
|
|
@@ -278,39 +285,29 @@ public abstract class PropertyList { |
|
|
|
* need them before all others (possible from-table-column() on any |
|
|
|
* other property further in the list... |
|
|
|
*/ |
|
|
|
String attributeName = "column-number"; |
|
|
|
String attributeValue = attributes.getValue(attributeName); |
|
|
|
convertAttributeToProperty(attributes, attributeName, |
|
|
|
attributeValue); |
|
|
|
attributeName = "number-columns-spanned"; |
|
|
|
attributeValue = attributes.getValue(attributeName); |
|
|
|
convertAttributeToProperty(attributes, attributeName, |
|
|
|
attributeValue); |
|
|
|
addAttributeToList(attributes, "column-number"); |
|
|
|
addAttributeToList(attributes, "number-columns-spanned"); |
|
|
|
|
|
|
|
/* |
|
|
|
* If font-size is set on this FO, must set it first, since |
|
|
|
* other attributes specified in terms of "ems" depend on it. |
|
|
|
*/ |
|
|
|
attributeName = "font"; |
|
|
|
attributeValue = attributes.getValue(attributeName); |
|
|
|
convertAttributeToProperty(attributes, attributeName, |
|
|
|
attributeValue); |
|
|
|
if (attributeValue == null) { |
|
|
|
String checkValue = addAttributeToList(attributes, "font"); |
|
|
|
if (checkValue == null || "".equals(checkValue)) { |
|
|
|
/* |
|
|
|
* font shorthand wasn't specified, so still need to process |
|
|
|
* explicit font-size |
|
|
|
*/ |
|
|
|
attributeName = "font-size"; |
|
|
|
attributeValue = attributes.getValue(attributeName); |
|
|
|
convertAttributeToProperty(attributes, attributeName, |
|
|
|
attributeValue); |
|
|
|
addAttributeToList(attributes, "font-size"); |
|
|
|
} |
|
|
|
|
|
|
|
String attributeName; |
|
|
|
String attributeValue; |
|
|
|
String attributeNS; |
|
|
|
FopFactory factory = getFObj().getUserAgent().getFactory(); |
|
|
|
for (int i = 0; i < attributes.getLength(); i++) { |
|
|
|
/* convert all attributes with the same namespace as the fo element |
|
|
|
* the "xml:lang" property is a special case */ |
|
|
|
* the "xml:lang" and "xml:base" properties are special cases */ |
|
|
|
attributeNS = attributes.getURI(i); |
|
|
|
attributeName = attributes.getQName(i); |
|
|
|
attributeValue = attributes.getValue(i); |
|
|
@@ -368,15 +365,14 @@ public abstract class PropertyList { |
|
|
|
String attributeValue) |
|
|
|
throws ValidationException { |
|
|
|
|
|
|
|
if (attributeValue != null) { |
|
|
|
|
|
|
|
if (attributeName.startsWith("xmlns:") |
|
|
|
|| "xmlns".equals(attributeName)) { |
|
|
|
//Ignore namespace declarations if the XML parser/XSLT processor |
|
|
|
//reports them as 'regular' attributes |
|
|
|
return; |
|
|
|
} |
|
|
|
if (attributeName.startsWith("xmlns:") |
|
|
|
|| "xmlns".equals(attributeName)) { |
|
|
|
/* Ignore namespace declarations if the XML parser/XSLT processor |
|
|
|
* reports them as 'regular' attributes */ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (attributeValue != null) { |
|
|
|
/* Handle "compound" properties, ex. space-before.minimum */ |
|
|
|
String basePropertyName = findBasePropertyName(attributeName); |
|
|
|
String subPropertyName = findSubPropertyName(attributeName); |