|
| 1 | +<?xml version="1.0" standalone="no"?> |
| 2 | +<!-- |
| 3 | + Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 | + contributor license agreements. See the NOTICE file distributed with |
| 5 | + this work for additional information regarding copyright ownership. |
| 6 | + The ASF licenses this file to You under the Apache License, Version 2.0 |
| 7 | + (the "License"); you may not use this file except in compliance with |
| 8 | + the License. You may obtain a copy of the License at |
| 9 | +
|
| 10 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | + Unless required by applicable law or agreed to in writing, software |
| 13 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + See the License for the specific language governing permissions and |
| 16 | + limitations under the License. |
| 17 | +--> |
| 18 | +<testcase> |
| 19 | + <info> |
| 20 | + <p> |
| 21 | + This test checks that IDs coming from images properly appear in the IF output. |
| 22 | + </p> |
| 23 | + </info> |
| 24 | + <fo> |
| 25 | + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> |
| 26 | + <fo:layout-master-set> |
| 27 | + <fo:simple-page-master master-name="sample"> |
| 28 | + <fo:region-body/> |
| 29 | + </fo:simple-page-master> |
| 30 | + </fo:layout-master-set> |
| 31 | + <fo:page-sequence master-reference="sample"> |
| 32 | + <fo:flow flow-name="xsl-region-body"> |
| 33 | + <fo:block font-size="large" font-style="italic">Testing SVG images, there should be no NPE</fo:block> |
| 34 | + <fo:block> |
| 35 | + <fo:block> This is a SVG with its size in em: <fo:instream-foreign-object> |
| 36 | + <svg class="hazardsymbol" height="5em" version="1.1" viewBox="0 0 600 600" xmlns="http://www.w3.org/2000/svg"> |
| 37 | + <rect fill="red" height="600" rx="10" ry="10" stroke="black" stroke-width="5" width="600" x="0" y="0"/> |
| 38 | + </svg> |
| 39 | + </fo:instream-foreign-object> |
| 40 | + </fo:block> |
| 41 | + </fo:block> |
| 42 | + </fo:flow> |
| 43 | + </fo:page-sequence> |
| 44 | + </fo:root> |
| 45 | + </fo> |
| 46 | + <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate"> |
| 47 | + <eval expected="5em" xpath="//if:page-sequence/descendant::*[local-name() = 'svg'][1]/@height"/> |
| 48 | + </if-checks> |
| 49 | +</testcase> |
0 commit comments