diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2008-02-03 12:05:49 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2008-02-03 12:05:49 +0000 |
commit | bc7583143625a86bdfd159058fa5b2762f2b64c2 (patch) | |
tree | 2f415bd49ee44056fa3b87575e93b22c5e899bd8 /src/java/org/apache/fop/fo/PropertyList.java | |
parent | 8e49549a9f59b5ee87a1c060fa9801916adf153d (diff) | |
download | xmlgraphics-fop-bc7583143625a86bdfd159058fa5b2762f2b64c2.tar.gz xmlgraphics-fop-bc7583143625a86bdfd159058fa5b2762f2b64c2.zip |
Added very basic parsing for the xml:lang shorthand.
No validation of the specified value, but the language and country
properties now do take the shorthand into account to determine their
value.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@617976 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/PropertyList.java')
-rw-r--r-- | src/java/org/apache/fop/fo/PropertyList.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fo/PropertyList.java b/src/java/org/apache/fop/fo/PropertyList.java index 1de74e2f0..3d050efed 100644 --- a/src/java/org/apache/fop/fo/PropertyList.java +++ b/src/java/org/apache/fop/fo/PropertyList.java @@ -310,11 +310,13 @@ public abstract class PropertyList { 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 for this fObj */ + /* convert all attributes with the same namespace as the fo element + * the "xml:lang" property is a special case */ attributeNS = attributes.getURI(i); attributeName = attributes.getQName(i); attributeValue = attributes.getValue(i); - if (attributeNS == null || attributeNS.length() == 0) { + if (attributeNS == null || attributeNS.length() == 0 + || "xml:lang".equals(attributeName)) { convertAttributeToProperty(attributes, attributeName, attributeValue); } else if (!factory.isNamespaceIgnored(attributeNS)) { ElementMapping mapping = factory.getElementMappingRegistry().getElementMapping( |