Commit 7d2c276a authored by Daniel Veillard's avatar Daniel Veillard

Fixed probles in some HTML tag autoclose, XML output bug on mixed-content

and fixed the related output for tests, Daniel.
parent 6077d03d
Mon Oct 11 14:31:58 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
* HTMLparser.c: fixed problems with some autoclose tags
* tree.c: fixed XML output problems.
* result/* SAXresult/*: update of the tests output
Sat Oct 9 11:02:57 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
* Makefile.am: Arturo patch for xmlConf.sh version info
......
......@@ -334,13 +334,13 @@ char *htmlStartClose[] = {
"TABLE", "P", "HEAD", "H1", "H2", "H3", "H4", "H5", "H6", "PRE",
"LISTING", "XMP", "A", NULL,
"TH", "TH", "TD", NULL,
"TD", "TH", "TD", NULL,
"TR", "TH", "TD", "TR", "CAPTION", "COL", "COLGROUP", NULL,
"TD", "TH", "TD", "P", NULL,
"TR", "TH", "TD", "TR", "CAPTION", "COL", "COLGROUP", "P", NULL,
"THEAD", "CAPTION", "COL", "COLGROUP", NULL,
"TFOOT", "TH", "TD", "TR", "CAPTION", "COL", "COLGROUP", "THEAD",
"TBODY", NULL,
"TBODY", "P", NULL,
"TBODY", "TH", "TD", "TR", "CAPTION", "COL", "COLGROUP", "THEAD",
"TFOOT", "TBODY", NULL,
"TFOOT", "TBODY", "P", NULL,
"OPTGROUP", "OPTION", NULL,
"FIELDSET", "LEGEND", "P", "HEAD", "H1", "H2", "H3", "H4", "H5", "H6",
"PRE", "LISTING", "XMP", "A", NULL,
......@@ -2245,7 +2245,7 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
const xmlChar *openTag = CUR_PTR;
xmlChar *name;
xmlChar *oldname;
xmlChar *currentNode;
xmlChar *currentNode = NULL;
htmlElemDescPtr info;
htmlParserNodeInfo node_info;
......
SAX.setDocumentLocator()
SAX.startDocument()
SAX.internalSubset(MEMO, -//SGMLSOURCE//DTD MEMO//EN, http://www.sgmlsource.com/dtds/memo.dtd)
SAX.resolveEntity(-//SGMLSOURCE//DTD MEMO//EN, http://www.sgmlsource.com/dtds/memo.dtd)
SAX.startElement(MEMO)
SAX.characters(
, 1)
......
SAX.setDocumentLocator()
SAX.startDocument()
SAX.internalSubset(EXAMPLE, (null), example.dtd)
SAX.resolveEntity( , example.dtd)
SAX.entityDecl(xml, 1, (null), (null), Extensible Markup Language)
SAX.getEntity(xml)
SAX.startElement(EXAMPLE)
SAX.characters(
, 5)
SAX.getEntity(xml)
SAX.isStandalone()
SAX.hasInternalSubset()
SAX.hasExternalSubset()
SAX.error: Entity 'xml' not defined
SAX.warning: Entity 'xml' not defined
SAX.characters(
, 1)
SAX.endElement(EXAMPLE)
......
SAX.setDocumentLocator()
SAX.startDocument()
SAX.internalSubset(EXAMPLE, (null), example.dtd)
SAX.resolveEntity( , example.dtd)
SAX.entityDecl(xml, 1, (null), (null), Extensible Markup Language)
SAX.getEntity(xml)
SAX.entityDecl(title, 2, -//MY-TITLE//FR, title.xml, (null))
SAX.entityDecl(image, 3, (null), img.gif, GIF)
SAX.unparsedEntityDecl(image, (null), img.gif, GIF)
SAX.startElement(EXAMPLE)
SAX.characters(
, 3)
SAX.getEntity(title)
SAX.isStandalone()
SAX.hasInternalSubset()
SAX.hasExternalSubset()
SAX.error: Entity 'title' not defined
SAX.warning: Entity 'title' not defined
SAX.characters(
This text is about XML, the, 31)
SAX.getEntity(xml)
SAX.isStandalone()
SAX.hasInternalSubset()
SAX.hasExternalSubset()
SAX.error: Entity 'xml' not defined
SAX.warning: Entity 'xml' not defined
SAX.characters( and this is an embedded , 25)
SAX.startElement(IMG, src='image')
SAX.endElement(IMG)
......
SAX.setDocumentLocator()
SAX.startDocument()
SAX.internalSubset(EXAMPLE, (null), example.dtd)
SAX.resolveEntity( , example.dtd)
SAX.entityDecl(xml, 1, (null), (null), Extensible Markup Language)
SAX.getEntity(xml)
SAX.startElement(EXAMPLE, prop1='a&amp;b', prop2='&xml;')
SAX.getEntity(amp)
SAX.getEntity(xml)
SAX.warning: Entity 'xml' not defined
SAX.startElement(EXAMPLE, prop1='a&amp;b', prop2='')
SAX.characters(
Test of entities in attribu, 35)
SAX.endElement(EXAMPLE)
......
SAX.setDocumentLocator()
SAX.startDocument()
SAX.internalSubset(EXAMPLE, (null), example.dtd)
SAX.resolveEntity( , example.dtd)
SAX.entityDecl(xml, 1, (null), (null), Extensible Markup Language)
SAX.getEntity(xml)
SAX.startElement(EXAMPLE)
......
......@@ -2,12 +2,6 @@ SAX.setDocumentLocator()
SAX.startDocument()
SAX.startElement(EXAMPLE)
SAX.characters(
This is an inverted excla, 42)
SAX.characters(¡, 1)
SAX.characters(
This is a space , 21)
SAX.characters( , 1)
SAX.characters(
, 2)
This is an inverted excla, 67)
SAX.endElement(EXAMPLE)
SAX.endDocument()
......@@ -41,6 +41,7 @@ SAX.characters(
SAX.startElement(USES)
SAX.characters(
, 3)
SAX.getEntity(amp)
SAX.startElement(STATEMENT, action='read&amp;write', purp='0', recpnt='0', id='1')
SAX.characters(
, 5)
......
......@@ -68,21 +68,13 @@ SAX.endElement(RPM:Summary)
SAX.characters(
, 5)
SAX.startElement(RPM:Description)
SAX.characters(Diese Library stellt dem Progr, 57)
SAX.characters(, 1)
SAX.characters(ngige
Routinen zur Ansteuerung, 57)
SAX.characters(, 1)
SAX.characters(gung, die
speziell optimiert s, 57)
SAX.characters(Diese Library stellt dem Progr, 173)
SAX.getEntity(apos)
SAX.characters(', 1)
SAX.characters(new curses, 10)
SAX.getEntity(apos)
SAX.characters(', 1)
SAX.characters( (ncurses) Variante und ist de, 51)
SAX.characters(, 1)
SAX.characters(r die klassische Curses-Librar, 70)
SAX.characters( (ncurses) Variante und ist de, 122)
SAX.endElement(RPM:Description)
SAX.characters(
, 5)
......
SAX.setDocumentLocator()
SAX.startDocument()
SAX.internalSubset(svg, -//W3C//DTD SVG April 1999//EN, http://www.w3.org/Graphics/SVG/svg-19990412.dtd)
SAX.resolveEntity(-//W3C//DTD SVG April 1999//EN, http://www.w3.org/Graphics/SVG/svg-19990412.dtd)
SAX.startElement(svg, width='242px', height='383px')
SAX.characters(
, 1)
......
SAX.setDocumentLocator()
SAX.startDocument()
SAX.internalSubset(svg, -//W3C//DTD SVG April 1999//EN, http://www.w3.org/Graphics/SVG/svg-19990412.dtd)
SAX.resolveEntity(-//W3C//DTD SVG April 1999//EN, http://www.w3.org/Graphics/SVG/svg-19990412.dtd)
SAX.startElement(svg, width='268px', height='207px')
SAX.characters(
, 1)
......
xmlSAXUserParseFile returned error 26
SAX.setDocumentLocator()
SAX.startDocument()
SAX.internalSubset(test, (null), (null))
SAX.getEntity(amp)
SAX.entityDecl(example, 1, (null), (null), <p>An ampersand (&#38;) may be escaped
numerically (&#38;#38;) or with a general entity
(&amp;).</p>)
(&amp;amp;).</p>)
SAX.getEntity(example)
SAX.startElement(test)
SAX.getEntity(example)
SAX.isStandalone()
SAX.hasInternalSubset()
SAX.hasExternalSubset()
SAX.error: Entity 'example' not defined
SAX.endElement(test)
SAX.endDocument()
xmlSAXUserParseFile returned error 26
xmlSAXUserParseFile returned error 27
SAX.setDocumentLocator()
SAX.startDocument()
SAX.internalSubset(test, (null), (null))
SAX.elementDecl(test, 3, ...)
SAX.entityDecl(xx, 4, (null), (null), %zz;)
SAX.getEntity(xx)
SAX.getParameterEntity(xx)
SAX.entityDecl(zz, 4, (null), (null), <!ENTITY tricky "error-prone" >)
SAX.getEntity(zz)
SAX.getEntity(xx)
SAX.warning: xmlParsePEReference: %xx; not found
SAX.getParameterEntity(zz)
SAX.getParameterEntity(xx)
SAX.error: PEReference: %xx; not found
SAX.startElement(test)
SAX.characters(This sample shows a , 20)
SAX.getEntity(tricky)
SAX.isStandalone()
SAX.hasInternalSubset()
SAX.hasExternalSubset()
SAX.error: Entity 'tricky' not defined
SAX.warning: Entity 'tricky' not defined
SAX.characters( method., 8)
SAX.endElement(test)
SAX.endDocument()
xmlSAXUserParseFile returned error 27
......@@ -2,7 +2,7 @@
<svg xmlns="http://www.w3.org/Graphics/SVG/svg-19990412.dtd" width="4in" height="3in">
<desc>This well formed svg document draws a triangle which is a hyperlink
</desc>
<a link="simple" show="replace" actuate="user" href="http://www.w3.org">
<a xml:link="simple" show="replace" actuate="user" href="http://www.w3.org">
<p d="M 0 0 L 200 0 L 100 200 Z"/>
</a>
</svg>
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN" "http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<!--DOCTYPE svg SYSTEM "svg-19990412.dtd"-->
<svg width="4in" height="3in">
<title>Kona Lavadome mountain bike
</title>
......@@ -12,27 +13,33 @@
<defs>
<symbol id="spoke">
<desc>14/12 gauge double butted spoke</desc>
<!-- the path data goes here --> </symbol>
<!-- the path data goes here -->
</symbol>
<symbol id="hub">
<desc>black anodised low torsion hub</desc>
<!--the path data goes here --> </symbol>
<!--the path data goes here -->
</symbol>
<symbol id="rim">
<desc>twin wall, eyeletted rim</desc>
<!-- the path data goes here--> </symbol>
<!-- the path data goes here-->
</symbol>
<symbol id="cogs">
<desc>8 speed, wide ratio gearing</desc>
<!--the path data goes here --> </symbol>
<!--the path data goes here -->
</symbol>
<symbol id="lacing">
<desc>double cross lacing of 32 spokes</desc>
</symbol>
</defs>
<!-- the overall bike drawing goes here --> <g id="frontwheel">
<!-- the overall bike drawing goes here -->
<g id="frontwheel">
<title>Front wheel</title>
<desc>The front wheel provides grip, steering and some shock absorption</desc>
<use href="id(lacing)" style="rotation: 20deg; fillcolor: black"/>
</g>
<g id="backwheel"/>
<g id="frame">
<!-- and so on --> </g>
<!-- and so on -->
</g>
</g>
</svg>
......@@ -10,4 +10,5 @@
<desc>Defining things for later use
</desc>
<!-- SVG elements in here would reference/use
the elements defined in the <defs> --></svg>
the elements defined in the <defs> -->
</svg>
......@@ -9,5 +9,6 @@
This is a bar chart which shows
company sales by region.
</desc>
<!-- Bar chart defined as vector data --> </g>
<!-- Bar chart defined as vector data -->
</g>
</svg>
......@@ -6,7 +6,8 @@
<g>
<defs>
<lineargradient id="MyGradient">
<!-- Define linear gradient here --> <gradientstop offset="0%" color="#F60"/>
<!-- Define linear gradient here -->
<gradientstop offset="0%" color="#F60"/>
<gradientstop offset="70%" color="#FF6"/>
</lineargradient>
</defs>
......
......@@ -2,7 +2,7 @@
<svg xmlns="http://www.w3.org/Graphics/SVG/svg-19990412.dtd" width="4in" height="3in">
<desc>This links to an external image
</desc>
<image x="200" y="200" style="width: 100px; height: 100px" link="simple" show="embed" actuate="auto" href="myimage.png">
<image xml:link="simple" x="200" y="200" style="width: 100px; height: 100px" show="embed" actuate="auto" href="myimage.png">
<title>My image</title>
</image>
</svg>
......@@ -10,11 +10,14 @@
</desc>
<path d="M0 0">
<!-- Place an arrowhead rotated 180 degrees at the
beginning of the path --> <marker href="#Triangle" width="200" height="200" style="text-transform: rotate(180)"/>
beginning of the path -->
<marker href="#Triangle" width="200" height="200" style="text-transform: rotate(180)"/>
<data d="M 2000 2000"/>
<!-- Turn off markers in the middle of the path --> <marker href=""/>
<!-- Turn off markers in the middle of the path -->
<marker href=""/>
<data d="L 4000 2000 L 4000 4000"/>
<!-- Place an arrowhead at the end of the path--> <marker href="#Triangle" width="200" height="200"/>
<!-- Place an arrowhead at the end of the path-->
<marker href="#Triangle" width="200" height="200"/>
<data d="L 6000 4000"/>
</path>
</svg>
......@@ -5,16 +5,21 @@
MathML is not supported.
</desc>
<!-- The <switch> element will process the first child element
whose testing attributes evaluate to true.--> <switch>
whose testing attributes evaluate to true.-->
<switch>
<!-- Process the MathML if the system-required attribute
evaluates to true (i.e., the user agent supports MathML
embedded within SVG). --> <foreignobject system-required="http://www.w3.org/TR/REC-MathML-19980407" width="100" height="50">
<!-- MathML content goes here --> </foreignobject>
embedded within SVG). -->
<foreignobject system-required="http://www.w3.org/TR/REC-MathML-19980407" width="100" height="50">
<!-- MathML content goes here -->
</foreignobject>
<!-- Else, process the following alternate SVG.
Note that there are no testing attributes on the <g> element.
If no testing attributes are provided, it is as if there
were testing attributes and they evaluated to true.--> <g>
<!-- Draw a red rectangle with a text string on top. --> <rect style="fill: red"/>
were testing attributes and they evaluated to true.-->
<g>
<!-- Draw a red rectangle with a text string on top. -->
<rect style="fill: red"/>
<text>Formula goes here</text>
</g>
</switch>
......
<?xml version="1.0"?>
<ABC xmlns="http://parent.name.space" xmlns:svg="http://www.w3.org/Graphics/SVG/1.0">
<!-- document in the parent namespace --> <svg:svg width="40%" height="40%">
<!-- document in the parent namespace -->
<svg:svg width="40%" height="40%">
<svg:rectangle width="43.6" height="31.5"/>
<!-- svg graphic continues --> </svg:svg>
<!-- document in parent namespace continues --></ABC>
<!-- svg graphic continues -->
</svg:svg>
<!-- document in parent namespace continues -->
</ABC>
......@@ -4,7 +4,8 @@
<defs>
<symbol id="fourstar">
<!-- Define the pattern using standard graphics elements
such as paths, images, text and shapes --> </symbol>
such as paths, images, text and shapes -->
</symbol>
</defs>
<ellipse style="fill: url(#fourstar)" major="40" minor="27"/>
</svg>
......@@ -7,10 +7,12 @@
<myapp:piece label="Eastern Region" value="2.53"/>
<myapp:piece label="Southern Region" value="3.89"/>
<myapp:piece label="Western Region" value="2.04"/>
<!-- Other private data goes here --> </myapp:piechart>
<!-- Other private data goes here -->
</myapp:piechart>
</private>
</defs>
<desc>This chart includes private data in another namespace
</desc>
<!-- In here would be the actual graphics elements which
draw the pie chart --></svg>
draw the pie chart -->
</svg>
......@@ -3,10 +3,9 @@
<desc xmlns:mydoc="http://foo.org/mydoc">
<mydoc:title>This is an example SVG file</mydoc:title>
<mydoc:para>The global description uses markup from the
<mydoc:emph>mydoc</mydoc:emph>
namespace. </mydoc:para>
<mydoc:emph>mydoc</mydoc:emph> namespace.</mydoc:para>
</desc>
<g>
<!-- the picture goes here --> </g>
<!-- the picture goes here -->
</g>
</svg>
......@@ -2,10 +2,11 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN" "http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<svg width="4in" height="3in">
<defs>
<script>
<script>
<![CDATA[
/* Beep on mouseclick */
MouseClickHandler() { beep(); }
&gt;
]]>
</script>
</defs>
<circle onclick="MouseClickHandler()" r="85"/>
......
<?xml version="1.0" standalone="yes"?>
<parent xmlns="http://someplace.org" xmlns:svg="http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<!-- parent stuff here --> <svg:svg width="5cm" height="8cm">
<!-- parent stuff here -->
<svg:svg width="5cm" height="8cm">
<svg:ellipse major="200" minor="130"/>
</svg:svg>
<!-- ... --></parent>
<!-- ... -->
</parent>
......@@ -2,8 +2,9 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG April 1999//EN" "http://www.w3.org/Graphics/SVG/svg-19990412.dtd">
<svg width="4in" height="3in">
<defs>
<style>
.TitleText { font-size: 16; font-family: Helvetica } &gt;
<style>
<![CDATA[
.TitleText { font-size: 16; font-family: Helvetica } ]]>
</style>
</defs>
<text class="TitleText">Here is my title</text>
......
......@@ -3,11 +3,14 @@
<body>
<!-- The SMIL <switch> element will process the
first child element which tests true and skip
past all others. --> <switch>
past all others. -->
<switch>
<!-- The system-required attribute tests to see if
the user agent supports SVG. If true, then
render the file drawing.svg. --> <ref system-required="http://www.w3.org/Graphics/SVG/svg-19990412.dtd" type="image/svg" src="drawing.svg"/>
<!-- Else, render the alternate image. --> <img src="alternate_image.jpg"/>
render the file drawing.svg. -->
<ref system-required="http://www.w3.org/Graphics/SVG/svg-19990412.dtd" type="image/svg" src="drawing.svg"/>
<!-- Else, render the alternate image. -->
<img src="alternate_image.jpg"/>
</switch>
</body>
</smil>
......@@ -3,14 +3,20 @@
<svg width="4in" height="3in">
<defs>
<symbol id="TemplateObject01">
<!-- symbol definition here --> </symbol>
<!-- symbol definition here -->
</symbol>
</defs>
<desc>Examples of inline and referenced content
</desc>
<!-- <g> with inline content --> <g>
<!-- Inline content goes here --> </g>
<!-- referenced content --> <use href="#TemplateObject01"/>
<!-- <g> with both referenced and inline content --> <g>
<!-- <g> with inline content -->
<g>
<!-- Inline content goes here -->
</g>
<!-- referenced content -->
<use href="#TemplateObject01"/>
<!-- <g> with both referenced and inline content -->
<g>
<use href="#TemplateObject01"/>
<!-- Inline content goes here --> </g>
<!-- Inline content goes here -->
</g>
</svg>
......@@ -2,7 +2,7 @@
<svg xmlns="http://www.w3.org/Graphics/SVG/svg-19990412.dtd" width="4in" height="3in">
<desc>This well formed svg document contains a hyperlink
</desc>
<a link="simple" show="replace" actuate="user" href="http://www.w3.org">
<a xml:link="simple" show="replace" actuate="user" href="http://www.w3.org">
<p d="M 0 0 L 200 0 L 100 200 Z"/>
</a>
</svg>
......@@ -4,7 +4,5 @@
<desc>Simple text on a path
</desc>
<path id="MyPath" style="visibility: hidden" d="M 100 100 C 125 125 175 125 200 100"/>
<text>
<textpath href="#MyPath"/>
Text on path </text>
<text><textpath href="#MyPath"/>Text on path</text>
</svg>
......@@ -4,13 +4,17 @@
<desc>Demonstration of coordinate transforms
</desc>
<!-- The following two text elements will both draw with a
font height of 12 pixels --> <text style="font-size: 12">This prints 12 pixels high.</text>
font height of 12 pixels -->
<text style="font-size: 12">This prints 12 pixels high.</text>
<text style="font-size: 12px">This prints 12 pixels high.</text>
<!-- Now scale the coordinate system by 2. --> <g style="transform: scale(2)">
<!-- Now scale the coordinate system by 2. -->
<g style="transform: scale(2)">
<!-- The following text will actually draw 24 pixels high
because each unit in the new coordinate system equals
2 units in the previous coordinate system. --> <text style="font-size: 12">This prints 24 pixels high.</text>
2 units in the previous coordinate system. -->
<text style="font-size: 12">This prints 24 pixels high.</text>
<!-- The following text will actually still draw 12 pixels high
because the CSS unit specifier has been provided. --> <text style="font-size: 12px">This prints 12 pixels high.</text>
because the CSS unit specifier has been provided. -->
<text style="font-size: 12px">This prints 12 pixels high.</text>
</g>
</svg>
<?xml version="1.0" standalone="yes"?>
<svg xmlns="http://www.w3.org/Graphics/SVG/svg-19990412.dtd" width="4in" height="3in">
<!-- Insert drawing elements here --></svg>
<!-- Insert drawing elements here -->
</svg>
......@@ -5,6 +5,8 @@
thus establishing a new viewport
</desc>
<!-- The following statement establishing a new viewport
and renders SVG drawing B into that viewport --> <svg style="left: 25%; top: 25%" width="50%" height="50%">
<!-- drawing B goes here --> </svg>
and renders SVG drawing B into that viewport -->
<svg style="left: 25%; top: 25%" width="50%" height="50%">
<!-- drawing B goes here -->
</svg>
</svg>
......@@ -4,25 +4,32 @@
<desc>Transformation with establishment of a new viewport
</desc>
<!-- The following two text elements will both draw with a
font height of 12 pixels --> <text style="font-size: 12">This prints 12 pixels high.</text>
font height of 12 pixels -->
<text style="font-size: 12">This prints 12 pixels high.</text>
<text style="font-size: 12px">This prints 12 pixels high.</text>
<!-- Now scale the coordinate system by 2. --> <g style="transform: scale(2)">
<!-- Now scale the coordinate system by 2. -->
<g style="transform: scale(2)">
<!-- The following text will actually draw 24 pixels high
because each unit in the new coordinate system equals
2 units in the previous coordinate system. --> <text style="font-size: 12">This prints 24 pixels high.</text>
2 units in the previous coordinate system. -->
<text style="font-size: 12">This prints 24 pixels high.</text>
<!-- The following text will actually still draw 12 pixels high
because the CSS unit specifier has been provided. --> <text style="font-size: 12px">This prints 12 pixels high.</text>
because the CSS unit specifier has been provided. -->
<text style="font-size: 12px">This prints 12 pixels high.</text>
</g>
<!-- This time, scale the coordinate system by 3. --> <g style="transform: scale(3)">
<!-- This time, scale the coordinate system by 3. -->
<g style="transform: scale(3)">
<!-- Establish a new viewport and thus change the meaning of
some CSS unit specifiers. --> <svg style="left:0; top:0; right:100; bottom:100" width="100%" height="100%">
some CSS unit specifiers. -->
<svg style="left:0; top:0; right:100; bottom:100" width="100%" height="100%">
<!-- The following two text elements will both draw with a
font height of 36 screen pixels. The first text element
defines its height in user coordinates, which have been
scaled by 3. The second text element defines its height
in CSS px units, which have been redefined to be three times
as big as screen pixels due the <svg> element establishing
a new viewport. --> <text style="font-size: 12">This prints 36 pixels high.</text>
a new viewport. -->
<text style="font-size: 12">This prints 36 pixels high.</text>
<text style="font-size: 12px">This prints 36 pixels high.</text>
</svg>
</g>
......
<?xml version="1.0" standalone="yes"?>
<parent xmlns="http://some.url">
<!-- SVG graphic --> <svg xmlns="http://www.w3.org/Graphics/SVG/svg-19990412.dtd" width="100px" height="200px">
<!-- SVG graphic -->
<svg xmlns="http://www.w3.org/Graphics/SVG/svg-19990412.dtd" width="100px" height="200px">
<path d="M100,100 Q200,400,300,100"/>
<!-- rest of SVG graphic would go here --> </svg>
<!-- rest of SVG graphic would go here -->
</svg>
</parent>
./test/VC/ElementValid:3: validity error: No declaration for element doc
./test/VC/ElementValid:3: validity error: Validation failed: no DTD found !
<doc/>
^
^
<?xml version="1.0"?>
<doc>
<![CDATA[<greeting>Hello, world!</greeting>]]></doc>
<![CDATA[<greeting>Hello, world!</greeting>]]>
</doc>
......@@ -4,7 +4,4 @@
<!ELEMENT a (#PCDATA)>
<!ELEMENT b (#PCDATA)>
]>
<doc>
<a>This</a>
is a <b>valid</b>
document</doc>
<doc><a>This</a> is a <b>valid</b> document</doc>
......@@ -3,4 +3,5 @@
<!ENTITY xml "Extensible Markup Language">
]>
<EXAMPLE>
&xml;</EXAMPLE>
&xml;
</EXAMPLE>
......@@ -6,6 +6,5 @@
]>
<EXAMPLE>
&title;
This text is about XML, the &xml; and this is an embedded
<IMG src="image"/>
This text is about XML, the &xml; and this is an embedded <IMG src="image"/>
</EXAMPLE>
<?xml version="1.0"?>
<doc>
<![CDATA[<greeting>Hello, world!</greeting>]]></doc>
<![CDATA[<greeting>Hello, world!</greeting>]]>
</doc>
......@@ -3,4 +3,4 @@
<!ELEMENT doc (#PCDATA)>
<!ATTLIST doc val CDATA #IMPLIED>
]>
<doc val=""/>
<doc val="v1"/>
......@@ -4,7 +4,4 @@
<!ELEMENT a (#PCDATA)>
<!ELEMENT b (#PCDATA)>
]>
<doc>
<a>This</a>
is a <b>valid</b>
document</doc>
<doc><a>This</a> is a <b>valid</b> document</doc>
......@@ -6,7 +6,5 @@
]>
<EXAMPLE>
This text is about XML, the Extensible Markup Language and this is an embedded
<IMG src="image"/>
This text is about XML, the Extensible Markup Language and this is an embedded <IMG src="image"/>
</EXAMPLE>
This diff is collapsed.
This diff is collapsed.
......@@ -2662,6 +2662,20 @@ xmlBufferCCat(xmlBufferPtr buf, const char *str) {
}
}
/**
* xmlBufferLastChar:
* @buf: the buffer to dump
*
* Get the last char of the buffer
*
* Returns the last char from the buffer or 0 if empty
*/
xmlChar
xmlBufferLastChar(xmlBufferPtr buf) {
if ((buf == NULL) || (buf->use <= 0)) return(0);
return(buf->content[buf->use - 1]);
}
/**
* xmlBufferWriteCHAR:
* @buf: the XML buffer
......@@ -2899,38 +2913,38 @@ xmlAttrListDump(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) {
static void
xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level);
xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
int format);
/**
* xmlNodeListDump:
* @buf: the XML buffer output
* @doc: the document
* @cur: the first node
* @level: the imbrication level for indenting
* @format: is formatting allowed
*
* Dump an XML node list, recursive behaviour,children are printed too.
*/
static void
xmlNodeListDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level) {
int needIndent = 0, i;
xmlNodeListDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
int format) {
int i;
if (cur == NULL) {
fprintf(stderr, "xmlNodeListDump : node == NULL\n");
return;
}
while (cur != NULL) {
if ((cur->type != XML_TEXT_NODE) &&
(cur->type != XML_ENTITY_REF_NODE)) {
if (!needIndent) {
needIndent = 1;
xmlBufferWriteChar(buf, "\n");