You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by vh...@apache.org on 2011/04/18 20:36:07 UTC
svn commit: r1094690 [1/2] - in /xmlgraphics/fop/trunk: ./
src/documentation/intermediate-format-ng/
src/java/org/apache/fop/render/intermediate/ test/intermediate/
test/java/org/apache/fop/check/ test/java/org/apache/fop/intermediate/
test/java/org/ap...
Author: vhennebert
Date: Mon Apr 18 18:36:05 2011
New Revision: 1094690
URL: http://svn.apache.org/viewvc?rev=1094690&view=rev
Log:
Added id element to intermediate format to track the origin of content.
Added:
xmlgraphics/fop/trunk/test/intermediate/
xmlgraphics/fop/trunk/test/intermediate/block-container.xml (with props)
xmlgraphics/fop/trunk/test/intermediate/block-container_nested.xml (with props)
xmlgraphics/fop/trunk/test/intermediate/block.xml (with props)
xmlgraphics/fop/trunk/test/intermediate/block_nested.xml (with props)
xmlgraphics/fop/trunk/test/intermediate/block_span_pages.xml (with props)
xmlgraphics/fop/trunk/test/intermediate/images.xml (with props)
xmlgraphics/fop/trunk/test/intermediate/inlines.xml (with props)
xmlgraphics/fop/trunk/test/intermediate/list.xml (with props)
xmlgraphics/fop/trunk/test/intermediate/table.xml (with props)
xmlgraphics/fop/trunk/test/java/org/apache/fop/check/
xmlgraphics/fop/trunk/test/java/org/apache/fop/check/Check.java (with props)
xmlgraphics/fop/trunk/test/java/org/apache/fop/check/ChecksFactory.java (with props)
xmlgraphics/fop/trunk/test/java/org/apache/fop/check/package-info.java (with props)
xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/AbstractIFTestCase.java (with props)
xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/IFChecksFactory.java (with props)
xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/IFTestCase.java (with props)
xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/LayoutIFTestSuite.java
- copied, changed from r1090190, xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/IntermediateFormatTestSuite.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/TestAssistant.java
- copied, changed from r1090190, xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/TestEnvironment.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineChecksFactory.java (with props)
Removed:
xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/TestEnvironment.java
Modified:
xmlgraphics/fop/trunk/build.xml
xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFConstants.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java
xmlgraphics/fop/trunk/status.xml
xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/IFCheck.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/IFParserTestCase.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/IFTester.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/intermediate/IntermediateFormatTestSuite.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/EvalCheck.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/ResultCheck.java
xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/TrueCheck.java
Modified: xmlgraphics/fop/trunk/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/build.xml?rev=1094690&r1=1094689&r2=1094690&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/build.xml (original)
+++ xmlgraphics/fop/trunk/build.xml Mon Apr 18 18:36:05 2011
@@ -927,7 +927,12 @@ list of possible build targets.
testsuite="org.apache.fop.intermediate.AreaTreeXMLFormatTestSuite"
outfile="TEST-area-tree-xml-format"/>
</target>
- <target name="junit-intermediate-format" depends="junit-compile"
+ <target name="junit-intermediate-layout" depends="junit-compile" if="xmlunit.present">
+ <junit-run title="intermediate format from layout tests"
+ testsuite="org.apache.fop.intermediate.LayoutIFTestSuite"
+ outfile="TEST-intermediate-format-from-layout"/>
+ </target>
+ <target name="junit-intermediate-format" depends="junit-compile,junit-intermediate-layout"
description="Runs FOP's intermediate format JUnit tests" if="xmlunit.present">
<junit-run title="intermediate format"
testsuite="org.apache.fop.intermediate.IntermediateFormatTestSuite"
Modified: xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd?rev=1094690&r1=1094689&r2=1094690&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd (original)
+++ xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd Mon Apr 18 18:36:05 2011
@@ -42,6 +42,11 @@
</xs:complexContent>
</xs:complexType>
</xs:element>
+ <xs:element name="id">
+ <xs:complexType>
+ <xs:attribute name="name" use="required" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
<xs:element name="font">
<xs:complexType>
<xs:attribute name="family" type="xs:string"/>
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFConstants.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFConstants.java?rev=1094690&r1=1094689&r2=1094690&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFConstants.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFConstants.java Mon Apr 18 18:36:05 2011
@@ -67,6 +67,8 @@ public interface IFConstants extends XML
String EL_FONT = "font";
/** element name text */
String EL_TEXT = "text";
+ /** element name id */
+ String EL_ID = "id";
/** Parent element of the logical structure tree. */
String EL_STRUCTURE_TREE = "structure-tree";
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java?rev=1094690&r1=1094689&r2=1094690&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java Mon Apr 18 18:36:05 2011
@@ -48,6 +48,8 @@ public class IFContext {
private String structurePointer;
+ private String id = "";
+
/**
* Main constructor.
* @param ua the user agent
@@ -155,4 +157,23 @@ public class IFContext {
return this.structurePointer;
}
+ /**
+ * Sets the ID of the object enclosing the content that will follow.
+ *
+ * @param id the ID of the nearest ancestor object for which the id property was set
+ */
+ void setID(String id) {
+ assert id != null;
+ this.id = id;
+ }
+
+ /**
+ * Returns the ID of the object enclosing the current content.
+ *
+ * @return the ID of the nearest ancestor object for which the id property was set
+ */
+ String getID() {
+ return id;
+ }
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java?rev=1094690&r1=1094689&r2=1094690&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java Mon Apr 18 18:36:05 2011
@@ -24,6 +24,7 @@ import java.awt.Dimension;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.geom.AffineTransform;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
@@ -76,7 +77,7 @@ public class IFParser implements IFConst
private static SAXTransformerFactory tFactory
= (SAXTransformerFactory)SAXTransformerFactory.newInstance();
- private static Set handledNamespaces = new java.util.HashSet();
+ private static Set<String> handledNamespaces = new java.util.HashSet<String>();
static {
handledNamespaces.add(XMLNS_NAMESPACE_URI);
@@ -132,7 +133,7 @@ public class IFParser implements IFConst
private static class Handler extends DefaultHandler {
- private Map elementHandlers = new java.util.HashMap();
+ private Map<String, ElementHandler> elementHandlers = new HashMap<String, ElementHandler>();
private IFDocumentHandler documentHandler;
private IFPainter painter;
@@ -188,6 +189,7 @@ public class IFParser implements IFConst
//Page content
elementHandlers.put(EL_VIEWPORT, new ViewportHandler());
elementHandlers.put(EL_GROUP, new GroupHandler());
+ elementHandlers.put(EL_ID, new IDHandler());
elementHandlers.put(EL_FONT, new FontHandler());
elementHandlers.put(EL_TEXT, new TextHandler());
elementHandlers.put(EL_CLIP_RECT, new ClipRectHandler());
@@ -202,7 +204,7 @@ public class IFParser implements IFConst
}
}
- private void establishForeignAttributes(Map foreignAttributes) {
+ private void establishForeignAttributes(Map<QName, String> foreignAttributes) {
documentHandler.getContext().setForeignAttributes(foreignAttributes);
}
@@ -300,7 +302,7 @@ public class IFParser implements IFConst
private boolean startIFElement(String localName, Attributes attributes)
throws SAXException {
lastAttributes = new AttributesImpl(attributes);
- ElementHandler elementHandler = (ElementHandler)elementHandlers.get(localName);
+ ElementHandler elementHandler = elementHandlers.get(localName);
content.setLength(0);
ignoreCharacters = true;
if (elementHandler != null) {
@@ -346,7 +348,7 @@ public class IFParser implements IFConst
}
} else {
if (NAMESPACE.equals(uri)) {
- ElementHandler elementHandler = (ElementHandler)elementHandlers.get(localName);
+ ElementHandler elementHandler = elementHandlers.get(localName);
if (elementHandler != null) {
try {
elementHandler.endElement();
@@ -432,7 +434,7 @@ public class IFParser implements IFConst
documentHandler.getContext().setLanguage(
XMLUtil.convertRFC3066ToLocale(xmllang));
}
- Map foreignAttributes = getForeignAttributes(lastAttributes);
+ Map<QName, String> foreignAttributes = getForeignAttributes(lastAttributes);
establishForeignAttributes(foreignAttributes);
documentHandler.startPageSequence(id);
resetForeignAttributes();
@@ -453,7 +455,7 @@ public class IFParser implements IFConst
String pageMasterName = attributes.getValue("page-master-name");
int width = Integer.parseInt(attributes.getValue("width"));
int height = Integer.parseInt(attributes.getValue("height"));
- Map foreignAttributes = getForeignAttributes(lastAttributes);
+ Map<QName, String> foreignAttributes = getForeignAttributes(lastAttributes);
establishForeignAttributes(foreignAttributes);
documentHandler.startPage(index, name, pageMasterName,
new Dimension(width, height));
@@ -486,6 +488,7 @@ public class IFParser implements IFConst
public void endElement() throws IFException {
painter = null;
+ documentHandler.getContext().setID("");
documentHandler.endPageContent();
}
@@ -536,6 +539,16 @@ public class IFParser implements IFConst
}
+ private class IDHandler extends AbstractElementHandler {
+
+ @Override
+ public void startElement(Attributes attributes) throws IFException, SAXException {
+ String id = attributes.getValue("name");
+ documentHandler.getContext().setID(id);
+ }
+
+ }
+
private class FontHandler extends AbstractElementHandler {
public void startElement(Attributes attributes) throws IFException {
@@ -660,7 +673,7 @@ public class IFParser implements IFConst
int y = Integer.parseInt(lastAttributes.getValue("y"));
int width = Integer.parseInt(lastAttributes.getValue("width"));
int height = Integer.parseInt(lastAttributes.getValue("height"));
- Map foreignAttributes = getForeignAttributes(lastAttributes);
+ Map<QName, String> foreignAttributes = getForeignAttributes(lastAttributes);
establishForeignAttributes(foreignAttributes);
setStructurePointer(lastAttributes);
if (foreignObject != null) {
@@ -712,8 +725,8 @@ public class IFParser implements IFConst
}
}
- private static Map getForeignAttributes(Attributes atts) {
- Map foreignAttributes = null;
+ private static Map<QName, String> getForeignAttributes(Attributes atts) {
+ Map<QName, String> foreignAttributes = null;
for (int i = 0, c = atts.getLength(); i < c; i++) {
String ns = atts.getURI(i);
if (ns.length() > 0) {
@@ -721,7 +734,7 @@ public class IFParser implements IFConst
continue;
}
if (foreignAttributes == null) {
- foreignAttributes = new java.util.HashMap();
+ foreignAttributes = new java.util.HashMap<QName, String>();
}
QName qname = new QName(ns, atts.getQName(i));
foreignAttributes.put(qname, atts.getValue(i));
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java?rev=1094690&r1=1094689&r2=1094690&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java Mon Apr 18 18:36:05 2011
@@ -153,6 +153,8 @@ public class IFRenderer extends Abstract
private TextUtil textUtil = new TextUtil();
+ private Stack<String> ids = new Stack<String>();
+
/**
* Main constructor
*/
@@ -841,11 +843,13 @@ public class IFRenderer extends Abstract
public void renderInlineViewport(InlineViewport viewport) {
String ptr = (String) viewport.getTrait(Trait.PTR);
establishStructurePointer(ptr);
+ pushdID(viewport);
Dimension dim = new Dimension(viewport.getIPD(), viewport.getBPD());
viewportDimensionStack.push(dim);
super.renderInlineViewport(viewport);
viewportDimensionStack.pop();
resetStructurePointer();
+ popID(viewport);
}
/** {@inheritDoc} */
@@ -888,7 +892,9 @@ public class IFRenderer extends Abstract
/** {@inheritDoc} */
protected void renderInlineArea(InlineArea inlineArea) {
saveInlinePosIfTargetable(inlineArea);
+ pushdID(inlineArea);
super.renderInlineArea(inlineArea);
+ popID(inlineArea);
}
/** {@inheritDoc} */
@@ -952,7 +958,25 @@ public class IFRenderer extends Abstract
log.trace("renderBlock() " + block);
}
saveBlockPosIfTargetable(block);
+ pushdID(block);
super.renderBlock(block);
+ popID(block);
+ }
+
+ private void pushdID(Area area) {
+ String prodID = (String) area.getTrait(Trait.PROD_ID);
+ if (prodID != null) {
+ ids.push(prodID);
+ documentHandler.getContext().setID(prodID);
+ }
+ }
+
+ private void popID(Area area) {
+ String prodID = (String) area.getTrait(Trait.PROD_ID);
+ if (prodID != null) {
+ ids.pop();
+ documentHandler.getContext().setID(ids.empty() ? "" : ids.peek());
+ }
}
private Typeface getTypeface(String fontName) {
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java?rev=1094690&r1=1094689&r2=1094690&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java Mon Apr 18 18:36:05 2011
@@ -69,6 +69,8 @@ public class IFSerializer extends Abstra
/** Holds the intermediate format state */
private IFState state;
+ private String currentID = "";
+
/**
* Default constructor.
*/
@@ -306,6 +308,7 @@ public class IFSerializer extends Abstra
public void endPageContent() throws IFException {
try {
this.state = null;
+ currentID = "";
handler.endElement(EL_PAGE_CONTENT);
} catch (SAXException e) {
throw new IFException("SAX error in endPageContent()", e);
@@ -417,6 +420,7 @@ public class IFSerializer extends Abstra
/** {@inheritDoc} */
public void drawImage(String uri, Rectangle rect) throws IFException {
try {
+ addID();
AttributesImpl atts = new AttributesImpl();
addAttribute(atts, XLINK_HREF, uri);
addAttribute(atts, "x", Integer.toString(rect.x));
@@ -445,6 +449,7 @@ public class IFSerializer extends Abstra
/** {@inheritDoc} */
public void drawImage(Document doc, Rectangle rect) throws IFException {
try {
+ addID();
AttributesImpl atts = new AttributesImpl();
addAttribute(atts, "x", Integer.toString(rect.x));
addAttribute(atts, "y", Integer.toString(rect.y));
@@ -534,6 +539,7 @@ public class IFSerializer extends Abstra
public void drawLine(Point start, Point end, int width, Color color, RuleStyle style)
throws IFException {
try {
+ addID();
AttributesImpl atts = new AttributesImpl();
addAttribute(atts, "x1", Integer.toString(start.x));
addAttribute(atts, "y1", Integer.toString(start.y));
@@ -552,6 +558,7 @@ public class IFSerializer extends Abstra
public void drawText(int x, int y, int letterSpacing, int wordSpacing,
int[] dx, String text) throws IFException {
try {
+ addID();
AttributesImpl atts = new AttributesImpl();
addAttribute(atts, "x", Integer.toString(x));
addAttribute(atts, "y", Integer.toString(y));
@@ -671,7 +678,16 @@ public class IFSerializer extends Abstra
}
}
- // ---=== IFDocumentNavigationHandler ===---
+ private void addID() throws SAXException {
+ String id = getContext().getID();
+ if (!currentID.equals(id)) {
+ AttributesImpl atts = new AttributesImpl();
+ addAttribute(atts, "name", id);
+ handler.startElement(EL_ID, atts);
+ handler.endElement(EL_ID);
+ currentID = id;
+ }
+ }
private Map incompleteActions = new java.util.HashMap();
private List completeActions = new java.util.LinkedList();
Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=1094690&r1=1094689&r2=1094690&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Mon Apr 18 18:36:05 2011
@@ -59,6 +59,9 @@
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Renderers" dev="VH" type="add">
+ Added id element to intermediate format to track the origin of content.
+ </action>
<action context="Renderers" dev="AD" type="fix" fixes-bug="50987" due-to="Matthias Reischenbacher">
Bugzilla 50988: Fixed a NullPointerException in case a white-space fo:character was removed
due to white-space handling.
Added: xmlgraphics/fop/trunk/test/intermediate/block-container.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/intermediate/block-container.xml?rev=1094690&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/intermediate/block-container.xml (added)
+++ xmlgraphics/fop/trunk/test/intermediate/block-container.xml Mon Apr 18 18:36:05 2011
@@ -0,0 +1,64 @@
+<?xml version="1.0" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<testcase>
+ <info>
+ <p>
+ This test checks that IDs coming from a block-container properly appear in the IF output.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page"
+ page-height="320pt" page-width="420pt" margin="10pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body" text-align="justify">
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
+ bibendum auctor. Vivamus porttitor sollicitudin tortor eu vulputate.</fo:block>
+ <fo:block-container id="block-container" space-before="10pt" color="purple"
+ font-family="serif"><fo:block>In vel libero libero, a semper est. Vivamus dapibus ante id
+ lorem mattis eget mattis urna sodales. Vestibulum nec dui urna, in porta
+ mi.</fo:block></fo:block-container>
+ <fo:block space-before="10pt">Proin varius egestas erat. Proin ante eros, consequat eget
+ semper a, molestie non arcu. Praesent hendrerit dolor vel leo luctus dapibus.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+
+ <eval expected="8" xpath="count(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'])"/>
+
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][2])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][3])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][4])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][5])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][6])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][7])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][8])"/>
+
+ <eval expected="block-container" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][2]/@name"/>
+ </if-checks>
+</testcase>
Propchange: xmlgraphics/fop/trunk/test/intermediate/block-container.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/trunk/test/intermediate/block-container.xml
------------------------------------------------------------------------------
svn:keywords = Revision Id
Added: xmlgraphics/fop/trunk/test/intermediate/block-container_nested.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/intermediate/block-container_nested.xml?rev=1094690&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/intermediate/block-container_nested.xml (added)
+++ xmlgraphics/fop/trunk/test/intermediate/block-container_nested.xml Mon Apr 18 18:36:05 2011
@@ -0,0 +1,148 @@
+<?xml version="1.0" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<testcase>
+ <info>
+ <p>
+ This test checks that IDs coming from a block-container properly appear in the IF output.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page"
+ page-height="320pt" page-width="420pt" margin="10pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
+ bibendum auctor. Vivamus porttitor sollicitudin tortor eu vulputate.</fo:block>
+ <fo:block-container space-before="10pt" id="block-container_outer_1" color="purple">
+ <fo:block>In vel libero libero, a semper est. Vivamus dapibus ante id lorem mattis eget
+ mattis urna sodales.
+ <fo:block-container id="block-container_inner_1" color="blue" start-indent="2em">
+ <fo:block start-indent="0">Vestibulum nec dui urna, in porta mi. Proin varius egestas
+ erat. Donec pharetra iaculis dolor, ut rutrum nunc facilisis
+ at.</fo:block>
+ </fo:block-container>
+ Proin ante eros, consequat eget semper a, molestie non arcu. Praesent hendrerit dolor vel
+ leo luctus dapibus.</fo:block>
+ </fo:block-container>
+ <fo:block space-before="10pt">Nullam quam nisl, iaculis ut fermentum et, vestibulum id elit.
+ Suspendisse fermentum fermentum ullamcorper.</fo:block>
+ <fo:block-container space-before="10pt" color="purple" id="block-container_1">
+ <fo:block>Sed ultrices posuere posuere. Praesent vitae ligula odio.</fo:block>
+ </fo:block-container>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
+ bibendum auctor. Vivamus porttitor sollicitudin tortor eu vulputate.</fo:block>
+ <fo:block-container space-before="10pt" id="block-container_outer_2" color="purple">
+ <fo:block>In vel libero libero, a semper est. Vivamus dapibus ante id lorem mattis eget
+ mattis urna sodales.
+ <fo:block color="black" start-indent="2em">Mauris tincidunt, risus eget vulputate elementum,
+ turpis lorem aliquet purus, eu sagittis neque sapien vel lectus.
+ <fo:block-container id="block-container_inner_2" color="blue">
+ <fo:block>Vestibulum nec dui urna, in porta mi. Proin varius egestas erat. Donec
+ pharetra iaculis dolor, ut rutrum nunc facilisis at.</fo:block>
+ </fo:block-container>
+ Proin ante eros, consequat eget semper a, molestie non arcu. Praesent hendrerit dolor vel
+ leo luctus dapibus.</fo:block>
+ Vivamus ut sollicitudin metus. Curabitur sit amet aliquam
+ enim.</fo:block>
+ </fo:block-container>
+ <fo:block space-before="10pt">Nullam quam nisl, iaculis ut fermentum et, vestibulum id elit.
+ Suspendisse fermentum fermentum ullamcorper.</fo:block>
+ <fo:block-container space-before="10pt" color="purple" id="block-container_2">
+ <fo:block>Vivamus tellus libero, porttitor a lacinia a, tempor eu dui. Pellentesque
+ fermentum odio tempor lorem interdum pharetra.</fo:block>
+ </fo:block-container>
+ <fo:block space-before="10pt">Donec auctor venenatis convallis.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+
+ <!-- Page 1 -->
+ <eval expected="16" xpath="count(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'])"/>
+
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][2])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][3])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][4])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][5])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][6])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][7])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][8])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][9])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][10])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][11])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][12])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][13])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][14])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][15])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][16])"/>
+
+ <eval expected="block-container_outer_1" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="block-container_inner_1" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][2]/@name"/>
+ <eval expected="block-container_outer_1" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][3]/@name"/>
+ <eval expected="" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][4]/@name"/>
+ <eval expected="block-container_1" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][5]/@name"/>
+
+ <!-- Page 2 -->
+ <eval expected="22" xpath="count(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'])"/>
+
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][2])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][3])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][4])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][5])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][6])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][7])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][8])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][9])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][10])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][11])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][12])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][13])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][14])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][15])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][16])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][17])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][18])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][19])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][20])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][21])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][22])"/>
+
+ <eval expected="block-container_outer_2" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="block-container_inner_2" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][2]/@name"/>
+ <eval expected="block-container_outer_2" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][3]/@name"/>
+ <eval expected="" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][4]/@name"/>
+ <eval expected="block-container_2" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][5]/@name"/>
+ <eval expected="" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][6]/@name"/>
+
+ </if-checks>
+</testcase>
Propchange: xmlgraphics/fop/trunk/test/intermediate/block-container_nested.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/trunk/test/intermediate/block-container_nested.xml
------------------------------------------------------------------------------
svn:keywords = Revision Id
Added: xmlgraphics/fop/trunk/test/intermediate/block.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/intermediate/block.xml?rev=1094690&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/intermediate/block.xml (added)
+++ xmlgraphics/fop/trunk/test/intermediate/block.xml Mon Apr 18 18:36:05 2011
@@ -0,0 +1,63 @@
+<?xml version="1.0" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<testcase>
+ <info>
+ <p>
+ This test checks that IDs coming from a block properly appear in the IF output.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page"
+ page-height="320pt" page-width="420pt" margin="10pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body" text-align="justify">
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
+ bibendum auctor. Vivamus porttitor sollicitudin tortor eu vulputate.</fo:block>
+ <fo:block id="block" space-before="10pt" color="purple" font-family="serif">In vel libero
+ libero, a semper est. Vivamus dapibus ante id lorem mattis eget mattis urna sodales.
+ Vestibulum nec dui urna, in porta mi.</fo:block>
+ <fo:block space-before="10pt">Proin varius egestas erat. Proin ante eros, consequat eget
+ semper a, molestie non arcu. Praesent hendrerit dolor vel leo luctus dapibus.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+
+ <eval expected="8" xpath="count(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'])"/>
+
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][2])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][3])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][4])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][5])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][6])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][7])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][8])"/>
+
+ <eval expected="block" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][2]/@name"/>
+ </if-checks>
+</testcase>
Propchange: xmlgraphics/fop/trunk/test/intermediate/block.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/trunk/test/intermediate/block.xml
------------------------------------------------------------------------------
svn:keywords = Revision Id
Added: xmlgraphics/fop/trunk/test/intermediate/block_nested.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/intermediate/block_nested.xml?rev=1094690&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/intermediate/block_nested.xml (added)
+++ xmlgraphics/fop/trunk/test/intermediate/block_nested.xml Mon Apr 18 18:36:05 2011
@@ -0,0 +1,138 @@
+<?xml version="1.0" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<testcase>
+ <info>
+ <p>
+ This test checks that IDs coming from a block properly appear in the IF output.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page"
+ page-height="320pt" page-width="420pt" margin="10pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
+ bibendum auctor. Vivamus porttitor sollicitudin tortor eu vulputate.</fo:block>
+ <fo:block space-before="10pt" id="outer-block_1" color="purple">In vel libero libero, a semper
+ est. Vivamus dapibus ante id lorem mattis eget mattis urna sodales.
+ <fo:block id="inner-block_1" color="blue" start-indent="2em">Vestibulum nec dui urna, in
+ porta mi. Proin varius egestas erat. Donec pharetra iaculis dolor, ut rutrum nunc
+ facilisis at.</fo:block>
+ Proin ante eros, consequat eget semper a, molestie non arcu. Praesent hendrerit dolor vel
+ leo luctus dapibus.</fo:block>
+ <fo:block space-before="10pt">Nullam quam nisl, iaculis ut fermentum et, vestibulum id elit.
+ Suspendisse fermentum fermentum ullamcorper.</fo:block>
+ <fo:block space-before="10pt" color="purple" id="block_1">Sed ultrices posuere posuere.
+ Praesent vitae ligula odio.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
+ bibendum auctor. Vivamus porttitor sollicitudin tortor eu vulputate.</fo:block>
+ <fo:block space-before="10pt" id="outer-block_2" color="purple">In vel libero libero, a semper
+ est. Vivamus dapibus ante id lorem mattis eget mattis urna sodales.
+ <fo:block color="black" start-indent="2em">Mauris tincidunt, risus eget vulputate elementum,
+ turpis lorem aliquet purus, eu sagittis neque sapien vel lectus.
+ <fo:block id="inner-block_2" color="blue" start-indent="4em">Vestibulum nec dui urna, in
+ porta mi. Proin varius egestas erat. Donec pharetra iaculis dolor, ut rutrum nunc
+ facilisis at.</fo:block>
+ Proin ante eros, consequat eget semper a, molestie non arcu. Praesent hendrerit dolor vel
+ leo luctus dapibus.</fo:block>
+ Vivamus ut sollicitudin metus. Curabitur sit amet aliquam enim.</fo:block>
+ <fo:block space-before="10pt">Nullam quam nisl, iaculis ut fermentum et, vestibulum id elit.
+ Suspendisse fermentum fermentum ullamcorper.</fo:block>
+ <fo:block space-before="10pt" color="purple" id="block_2">Vivamus tellus libero, porttitor a
+ lacinia a, tempor eu dui. Pellentesque fermentum odio tempor lorem interdum
+ pharetra.</fo:block>
+ <fo:block space-before="10pt">Donec auctor venenatis convallis.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+
+ <!-- Page 1 -->
+ <eval expected="16" xpath="count(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'])"/>
+
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][2])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][3])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][4])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][5])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][6])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][7])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][8])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][9])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][10])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][11])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][12])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][13])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][14])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][15])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][16])"/>
+
+ <eval expected="outer-block_1" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="inner-block_1" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][2]/@name"/>
+ <eval expected="outer-block_1" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][3]/@name"/>
+ <eval expected="" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][4]/@name"/>
+ <eval expected="block_1" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][5]/@name"/>
+
+ <!-- Page 2 -->
+ <eval expected="22" xpath="count(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'])"/>
+
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][2])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][3])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][4])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][5])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][6])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][7])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][8])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][9])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][10])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][11])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][12])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][13])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][14])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][15])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][16])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][17])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][18])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][19])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][20])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][21])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][22])"/>
+
+ <eval expected="outer-block_2" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="inner-block_2" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][2]/@name"/>
+ <eval expected="outer-block_2" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][3]/@name"/>
+ <eval expected="" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][4]/@name"/>
+ <eval expected="block_2" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][5]/@name"/>
+ <eval expected="" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][6]/@name"/>
+
+ </if-checks>
+</testcase>
Propchange: xmlgraphics/fop/trunk/test/intermediate/block_nested.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/trunk/test/intermediate/block_nested.xml
------------------------------------------------------------------------------
svn:keywords = Revision Id
Added: xmlgraphics/fop/trunk/test/intermediate/block_span_pages.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/intermediate/block_span_pages.xml?rev=1094690&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/intermediate/block_span_pages.xml (added)
+++ xmlgraphics/fop/trunk/test/intermediate/block_span_pages.xml Mon Apr 18 18:36:05 2011
@@ -0,0 +1,126 @@
+<?xml version="1.0" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<testcase>
+ <info>
+ <p>
+ This test checks that IDs coming from a block that spans over different pages properly appear
+ in the IF output.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page"
+ page-height="120pt" page-width="270pt" margin="10pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body" font-size="8pt" line-height="10pt">
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
+ bibendum auctor.</fo:block>
+ <fo:block space-before="60pt" id="block" color="purple">In vel libero libero, a
+ semper est. Vivamus dapibus ante id lorem mattis eget mattis urna sodales. Proin ante
+ eros, consequat eget semper a, molestie non arcu. Praesent hendrerit dolor vel leo
+ luctus dapibus.</fo:block>
+ <fo:block space-before="10pt">Nullam quam nisl, iaculis ut fermentum et, vestibulum id elit.
+ Suspendisse fermentum fermentum ullamcorper.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body" font-size="8pt" line-height="10pt">
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
+ bibendum auctor.</fo:block>
+ <fo:block space-before="40pt" id="outer-block" color="purple">In vel libero libero, a semper
+ est. Vivamus dapibus ante id lorem mattis eget mattis urna sodales.
+ <fo:block id="inner-block" color="blue" start-indent="2em">Vestibulum nec dui urna, in
+ porta mi. Proin varius egestas erat. Donec pharetra iaculis dolor, ut rutrum nunc
+ facilisis at. Sed ultrices posuere posuere. Praesent vitae ligula odio. Vivamus
+ porttitor sollicitudin tortor eu vulputate.</fo:block>
+ Proin ante eros, consequat eget semper a, molestie non arcu. Praesent hendrerit dolor vel
+ leo luctus dapibus.</fo:block>
+ <fo:block space-before="10pt">Nullam quam nisl, iaculis ut fermentum et, vestibulum id elit.
+ Suspendisse fermentum fermentum ullamcorper.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+
+ <!-- Page-sequence 1 Page 1 -->
+ <eval expected="5" xpath="count(//if:page-sequence[1]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'])"/>
+
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][2])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][3])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][4])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][5])"/>
+
+ <eval expected="block" xpath="//if:page-sequence[1]/if:page[1]/descendant::*[local-name() = 'id'][1]/@name"/>
+
+ <!-- Page-sequence 1 Page 2 -->
+ <eval expected="6" xpath="count(//if:page-sequence[1]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'])"/>
+
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][2])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][3])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][4])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][5])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][6])"/>
+
+ <eval expected="block" xpath="//if:page-sequence[1]/if:page[2]/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="" xpath="//if:page-sequence[1]/if:page[2]/descendant::*[local-name() = 'id'][2]/@name"/>
+
+
+ <!-- Page-sequence 2 Page 1 -->
+ <eval expected="8" xpath="count(//if:page-sequence[2]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'])"/>
+
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][2])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][3])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][4])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][5])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][6])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][7])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'id'][8])"/>
+
+ <eval expected="outer-block" xpath="//if:page-sequence[2]/if:page[1]/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="inner-block" xpath="//if:page-sequence[2]/if:page[1]/descendant::*[local-name() = 'id'][2]/@name"/>
+
+ <!-- Page-sequence 2 Page 2 -->
+ <eval expected="9" xpath="count(//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'])"/>
+
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][2])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][3])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][4])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][5])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][6])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][7])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][8])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'text' or local-name() = 'id'][9])"/>
+
+ <eval expected="inner-block" xpath="//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="outer-block" xpath="//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'id'][2]/@name"/>
+ <eval expected="" xpath="//if:page-sequence[2]/if:page[2]/descendant::*[local-name() = 'id'][3]/@name"/>
+
+ </if-checks>
+</testcase>
Propchange: xmlgraphics/fop/trunk/test/intermediate/block_span_pages.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/trunk/test/intermediate/block_span_pages.xml
------------------------------------------------------------------------------
svn:keywords = Revision Id
Added: xmlgraphics/fop/trunk/test/intermediate/images.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/intermediate/images.xml?rev=1094690&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/intermediate/images.xml (added)
+++ xmlgraphics/fop/trunk/test/intermediate/images.xml Mon Apr 18 18:36:05 2011
@@ -0,0 +1,93 @@
+<?xml version="1.0" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<testcase>
+ <info>
+ <p>
+ This test checks that IDs coming from images properly appear in the IF output.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page"
+ page-height="320pt" page-width="420pt" margin="10pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body" text-align="justify">
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
+ bibendum auctor. <fo:external-graphic src="../resources/images/fop-logo-color-24bit.png"
+ id="external-graphic"/>Vivamus porttitor sollicitudin tortor eu vulputate. In vel
+ libero libero, a semper est.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body" text-align="justify">
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
+ bibendum auctor. <fo:instream-foreign-object id="instream-foreign-object" width="120pt"
+ display-align="center" content-width="scale-to-fit">
+ <svg xmlns="http://www.w3.org/2000/svg" width="300" height="286.6">
+ <g style="fill-opacity:0.7; stroke:black; stroke-width:3"
+ transform="translate(0, 286.6) scale(1, -1) translate(100, 100)">
+ <circle cx="50" cy="86.6" r="80" style="fill:red;"/>
+ <circle cx="0" cy="0" r="80" style="fill:green;"/>
+ <circle cx="100" cy="0" r="80" style="fill:blue;"/>
+ </g>
+ </svg>
+ </fo:instream-foreign-object> Vivamus porttitor sollicitudin tortor eu vulputate. In vel
+ libero libero, a semper est.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+
+ <!-- Page 1 -->
+ <eval expected="7" xpath="count(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'])"/>
+
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][2])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][3])"/>
+ <eval expected="image" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][4])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][5])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][6])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][7])"/>
+
+ <eval expected="external-graphic" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][2]/@name"/>
+
+ <!-- Page 2 -->
+ <eval expected="7" xpath="count(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'])"/>
+
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][2])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][3])"/>
+ <eval expected="image" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][4])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][5])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][6])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][7])"/>
+
+ <eval expected="instream-foreign-object" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][2]/@name"/>
+
+ </if-checks>
+</testcase>
Propchange: xmlgraphics/fop/trunk/test/intermediate/images.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/trunk/test/intermediate/images.xml
------------------------------------------------------------------------------
svn:keywords = Revision Id
Added: xmlgraphics/fop/trunk/test/intermediate/inlines.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/intermediate/inlines.xml?rev=1094690&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/intermediate/inlines.xml (added)
+++ xmlgraphics/fop/trunk/test/intermediate/inlines.xml Mon Apr 18 18:36:05 2011
@@ -0,0 +1,107 @@
+<?xml version="1.0" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<testcase>
+ <info>
+ <p>
+ This test checks that IDs coming from various inline elements properly appear in the IF
+ output.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page"
+ page-height="320pt" page-width="420pt" margin="10pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="page" id="page-sequence">
+ <fo:flow flow-name="xsl-region-body" text-align="justify">
+ <fo:block font-family="sans-serif">Lorem ipsum dolor sit amet, <fo:character id="character"
+ font-size="150%" font-weight="bold" color="purple" character="C"/>onsectetur adipiscing
+ elit. <fo:inline id="inline" color="purple" font-family="serif">Fusce rutrum leo a diam
+ bibendum auctor.</fo:inline> Vivamus porttitor sollicitudin tortor eu vulputate. In vel
+ libero libero, a semper est. Vivamus<fo:leader id="leader" leader-length="50pt"
+ leader-pattern="rule" color="purple"/> dapibus ante id lorem mattis eget mattis urna
+ sodales. This is page number <fo:page-number id="page-number" color="purple"/>. Vestibulum
+ nec dui urna, in porta mi. The fo:character object is on page <fo:page-number-citation
+ id="page-number-citation" ref-id="character" color="purple"/>. Proin varius egestas erat.
+ Proin ante eros, consequat eget semper a, molestie non arcu. The last page of this document
+ is page <fo:page-number-citation-last id="page-number-citation-last" ref-id="page-sequence"
+ color="purple"/>. Praesent hendrerit dolor vel leo luctus dapibus.</fo:block>
+
+ <fo:block break-before="page">Lorem ipsum dolor sit amet, consectetur adipiscing
+ elit.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+
+ <eval expected="32" xpath="count(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'])"/>
+
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][1])"/>
+ <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][2])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][3])"/>
+ <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][4])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][5])"/>
+ <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][6])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][7])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][8])"/>
+ <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][9])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][10])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][11])"/>
+ <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][12])"/>
+ <eval expected="line" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][13])"/>
+ <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][14])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][15])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][16])"/>
+ <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][17])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][18])"/>
+ <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][19])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][20])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][21])"/>
+ <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][22])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][23])"/>
+ <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][24])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][25])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][26])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][27])"/>
+ <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][28])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][29])"/>
+ <eval expected="id" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][30])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][31])"/>
+ <eval expected="text" xpath="local-name(//if:page[1]/descendant::*[local-name() = 'text' or local-name() = 'line' or local-name() = 'id'][32])"/>
+
+ <eval expected="character" xpath="//if:page[1]/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="" xpath="//if:page[1]/descendant::*[local-name() = 'id'][2]/@name"/>
+ <eval expected="inline" xpath="//if:page[1]/descendant::*[local-name() = 'id'][3]/@name"/>
+ <eval expected="" xpath="//if:page[1]/descendant::*[local-name() = 'id'][4]/@name"/>
+ <eval expected="leader" xpath="//if:page[1]/descendant::*[local-name() = 'id'][5]/@name"/>
+ <eval expected="" xpath="//if:page[1]/descendant::*[local-name() = 'id'][6]/@name"/>
+ <eval expected="page-number" xpath="//if:page[1]/descendant::*[local-name() = 'id'][7]/@name"/>
+ <eval expected="" xpath="//if:page[1]/descendant::*[local-name() = 'id'][8]/@name"/>
+ <eval expected="page-number-citation" xpath="//if:page[1]/descendant::*[local-name() = 'id'][9]/@name"/>
+ <eval expected="" xpath="//if:page[1]/descendant::*[local-name() = 'id'][10]/@name"/>
+ <eval expected="page-number-citation-last" xpath="//if:page[1]/descendant::*[local-name() = 'id'][11]/@name"/>
+ <eval expected="" xpath="//if:page[1]/descendant::*[local-name() = 'id'][12]/@name"/>
+
+ </if-checks>
+</testcase>
Propchange: xmlgraphics/fop/trunk/test/intermediate/inlines.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/trunk/test/intermediate/inlines.xml
------------------------------------------------------------------------------
svn:keywords = Revision Id
Added: xmlgraphics/fop/trunk/test/intermediate/list.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/intermediate/list.xml?rev=1094690&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/intermediate/list.xml (added)
+++ xmlgraphics/fop/trunk/test/intermediate/list.xml Mon Apr 18 18:36:05 2011
@@ -0,0 +1,112 @@
+<?xml version="1.0" standalone="no"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<testcase>
+ <info>
+ <p>
+ This test checks that IDs coming from the various elements of a list properly appear in the IF
+ output.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page"
+ page-height="320pt" page-width="420pt" margin="10pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body" text-align="justify">
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
+ bibendum auctor. Vivamus porttitor sollicitudin tortor eu vulputate.</fo:block>
+ <fo:list-block provisional-distance-between-starts="10pt" provisional-label-separation="5pt"
+ id="list-block" space-before="10pt">
+ <fo:list-item id="list-item_1">
+ <fo:list-item-label end-indent="label-end()" id="list-item-label">
+ <fo:block>â¢</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()" id="list-item-body">
+ <fo:block>Item 1</fo:block>
+ <fo:block>id="list-item-body"</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item id="list-item_2" space-before="5pt">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>â¢</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block>Item 2</fo:block>
+ <fo:block>id="list-item_2"</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item space-before="5pt">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>â¢</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block>Item 3</fo:block>
+ <fo:block>id="list-block"</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block id="block" space-before="10pt" color="purple" font-family="serif">In vel libero
+ libero, a semper est. Vivamus dapibus ante id lorem mattis eget mattis urna sodales.
+ Vestibulum nec dui urna, in porta mi.</fo:block>
+ <fo:block space-before="10pt">Proin varius egestas erat. Proin ante eros, consequat eget
+ semper a, molestie non arcu. Praesent hendrerit dolor vel leo luctus dapibus.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </fo:root>
+ </fo>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+
+ <eval expected="21" xpath="count(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'])"/>
+
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][1])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][2])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][3])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][4])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][5])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][6])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][7])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][8])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][9])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][10])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][11])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][12])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][13])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][14])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][15])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][16])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][17])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][18])"/>
+ <eval expected="id" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][19])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][20])"/>
+ <eval expected="text" xpath="local-name(//if:page-sequence/descendant::*[local-name() = 'text' or local-name() = 'id'][21])"/>
+
+ <eval expected="list-item-label" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][1]/@name"/>
+ <eval expected="list-item-body" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][2]/@name"/>
+ <eval expected="list-item_2" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][3]/@name"/>
+ <eval expected="list-block" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][4]/@name"/>
+ <eval expected="block" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][5]/@name"/>
+ <eval expected="" xpath="//if:page-sequence/descendant::*[local-name() = 'id'][6]/@name"/>
+
+ </if-checks>
+</testcase>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org