diff options
-rw-r--r-- | examples/cxx/tree/messaging/dom-serialize.cxx | 1 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/serialization-source.txx | 7 | ||||
-rw-r--r-- | tests/cxx/tree/default/general/output | 13 | ||||
-rw-r--r-- | tests/cxx/tree/default/omit/output | 2 | ||||
-rw-r--r-- | tests/cxx/tree/encoding/char/iso-8859-1/test.std | 8 | ||||
-rw-r--r-- | tests/cxx/tree/encoding/char/lcp/test.std | 2 | ||||
-rw-r--r-- | tests/cxx/tree/encoding/char/utf-8/test.std | 9 | ||||
-rw-r--r-- | tests/cxx/tree/encoding/wchar/test.std | 8 | ||||
-rw-r--r-- | tests/cxx/tree/float/test.std | 33 | ||||
-rw-r--r-- | tests/cxx/tree/prefix/output | 4 |
10 files changed, 8 insertions, 79 deletions
diff --git a/examples/cxx/tree/messaging/dom-serialize.cxx b/examples/cxx/tree/messaging/dom-serialize.cxx index e303e9c..f6ce4e4 100644 --- a/examples/cxx/tree/messaging/dom-serialize.cxx +++ b/examples/cxx/tree/messaging/dom-serialize.cxx @@ -53,6 +53,7 @@ serialize (std::ostream& os, // conf->setParameter (XMLUni::fgDOMWRTDiscardDefaultContent, true); conf->setParameter (XMLUni::fgDOMWRTFormatPrettyPrint, true); + conf->setParameter (XMLUni::fgDOMWRTXercesPrettyPrint, false); xml::dom::auto_ptr<DOMLSOutput> out (impl->createLSOutput ()); out->setEncoding (xml::string (encoding).c_str ()); diff --git a/libxsd/xsd/cxx/xml/dom/serialization-source.txx b/libxsd/xsd/cxx/xml/dom/serialization-source.txx index efd4141..f96dcb4 100644 --- a/libxsd/xsd/cxx/xml/dom/serialization-source.txx +++ b/libxsd/xsd/cxx/xml/dom/serialization-source.txx @@ -310,8 +310,15 @@ namespace xsd if (!(flags & dont_pretty_print) && conf->canSetParameter (XMLUni::fgDOMWRTFormatPrettyPrint, true)) + { conf->setParameter (XMLUni::fgDOMWRTFormatPrettyPrint, true); + // Don't add extra new lines between first-level elements. + // + if (conf->canSetParameter (XMLUni::fgDOMWRTXercesPrettyPrint, true)) + conf->setParameter (XMLUni::fgDOMWRTXercesPrettyPrint, false); + } + // See if we need to write XML declaration. // if ((flags & no_xml_declaration) && diff --git a/tests/cxx/tree/default/general/output b/tests/cxx/tree/default/general/output index 72a8fa4..396a698 100644 --- a/tests/cxx/tree/default/general/output +++ b/tests/cxx/tree/default/general/output @@ -1,28 +1,15 @@ <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <t:root xmlns:t="test" base64_bin1="" base64_bin2="YmFzZTY0IGJpbmFyeQ==
" bool1="true" bool2="true" bool3="false" bool4="false" byte="-99" decimal1="1.12345" decimal2="-0.456" double1="1.12345" double2="1123.45" double3="-0.00012345" double4="NaN" double5="-INF" fix1="123" fix2="123" fix3="abc" fix4="abc" fix5="aaa bbb ccc" fix6="aaa bbb ccc" float1="1.123" float2="1123" float3="-0.000123" float4="NaN" float5="-INF" hex_bin1="" hex_bin2="6865782052696E617279" id="this" idref="this" idrefs="this" int="-99999" integer="-99999" language="en-us" long="-99999" ncname="abcd" ninteger="-99999" nmtoken="ab:cd" nmtokens1="a:b efg aaa" nmtokens2="abc" nninteger="99999" npinteger="-99999" nstring=" a b " pinteger="99999" qname1="foo" qname2="t:bar" short="-999" string1="" string2=" a b " token="a b" ubyte="99" uint="99999" ulong="99999" uri="http://example.com" ushort="999"> - <union a="abc"/> - <list a="123 345 678" b="ab cd ef" c="abc" d="abc def"/> - <simple a="123" b="abc" c="123" d="abc" e="abc" f="abc 123"/> - <date a="2009-03-31" b="2009-03-31Z" c="2009-03-31Z" d="2009-03-31Z" e="2009-03-31+12:30" f="2009-03-31-12:30" g="2002009-03-31-12:30"/> - <time a="12:03:45" b="12:03:45.123Z" c="12:03:05.123Z" d="12:03:45.123Z" e="12:03:45.123+12:30" f="12:03:45-12:30"/> - <date-time a="2009-03-31T12:03:45" b="2009-03-31T12:03:45.123Z" c="2002009-03-31T12:03:05.123-12:30"/> - <duration a="P100Y" b="P100M" c="P100D" d="PT12H" e="PT12M" f="PT12.123S" g="-P100Y10M20DT12H12M1.123S"/> - <day a="---02" b="---22Z" c="---22-12:30"/> - <month a="--02" b="--12Z" c="--12+12:30"/> - <year a="2009" b="-2002009Z" c="2009-12:30"/> - <month-day a="--02-02" b="--12-22Z" c="--12-22+12:30"/> - <year-month a="2009-02" b="-2002009-12Z" c="2009-12-12:30"/> - </t:root> diff --git a/tests/cxx/tree/default/omit/output b/tests/cxx/tree/default/omit/output index eef99a3..150ad58 100644 --- a/tests/cxx/tree/default/omit/output +++ b/tests/cxx/tree/default/omit/output @@ -13,9 +13,7 @@ fixed q1: 1 fixed q2: 2 <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <t:root xmlns:t="test"> - <derived q1="1" q2="2"> <a>a</a> </derived> - </t:root> diff --git a/tests/cxx/tree/encoding/char/iso-8859-1/test.std b/tests/cxx/tree/encoding/char/iso-8859-1/test.std index ca6297f..d26b30f 100644 --- a/tests/cxx/tree/encoding/char/iso-8859-1/test.std +++ b/tests/cxx/tree/encoding/char/iso-8859-1/test.std @@ -1,18 +1,10 @@ <?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?> <t:root xmlns:t="test"> - <a>abc</a> - <a>æ</a> - <a>¢£¤¥</a> - <a>???</a> - <b>abc</b> - <b>aâc</b> - <b>âòbc</b> - </t:root> diff --git a/tests/cxx/tree/encoding/char/lcp/test.std b/tests/cxx/tree/encoding/char/lcp/test.std index cc20ef7..368826d 100644 --- a/tests/cxx/tree/encoding/char/lcp/test.std +++ b/tests/cxx/tree/encoding/char/lcp/test.std @@ -1,6 +1,4 @@ <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <t:root xmlns:t="test"> - <a>abcd</a> - </t:root> diff --git a/tests/cxx/tree/encoding/char/utf-8/test.std b/tests/cxx/tree/encoding/char/utf-8/test.std index 68ca51c..ffce337 100644 --- a/tests/cxx/tree/encoding/char/utf-8/test.std +++ b/tests/cxx/tree/encoding/char/utf-8/test.std @@ -1,20 +1,11 @@ <?xml version="1.0" encoding="ASCII" standalone="no" ?> <t:root xmlns:t="test"> - <a>abc</a> - <a>Օ</a> - <a>ꪪ</a> - <a>򪪪</a> - <b>abc</b> - <b>aՕc</b> - <b>ꪪbc</b> - <b>ab򪪪</b> - </t:root> diff --git a/tests/cxx/tree/encoding/wchar/test.std b/tests/cxx/tree/encoding/wchar/test.std index cdc3517..815ba6c 100644 --- a/tests/cxx/tree/encoding/wchar/test.std +++ b/tests/cxx/tree/encoding/wchar/test.std @@ -1,18 +1,10 @@ <?xml version="1.0" encoding="ASCII" standalone="no" ?> <t:root xmlns:t="test"> - <a>abc</a> - <a>῿퟿</a> - <a>𐀀􏿽</a> - <b>abc</b> - <b>a῿퟿c</b> - <b>𐀀􏿽bc</b> - <b>ab𐀀􏿽</b> - </t:root> diff --git a/tests/cxx/tree/float/test.std b/tests/cxx/tree/float/test.std index 44264c2..399e28c 100644 --- a/tests/cxx/tree/float/test.std +++ b/tests/cxx/tree/float/test.std @@ -1,68 +1,35 @@ <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <t:root xmlns:t="test" de="0" do="0" f="0" s="12.13"> - <float>0</float> - <float>1</float> - <float>1e+06</float> - <float>1e-07</float> - <float-list>0 1 1e+06 1e-07</float-list> - <double>0</double> - <double>1</double> - <double>100000000000000</double> - <double>1e-15</double> - <double-list>0 1 100000000000000 1e-15</double-list> - <decimal>0</decimal> - <decimal>1</decimal> - <decimal>10000</decimal> - <decimal>100000000000000</decimal> - <decimal>0.000000000000001</decimal> - <decimal-list>0 1 100000000000000 0.000000000000001</decimal-list> - <simple>0</simple> - <simple>1</simple> - <simple>12.34</simple> - <simple>0.12</simple> - <simple>12.13</simple> - <simple>123.1</simple> - <simple>1234</simple> - <complex>0</complex> - <complex>1</complex> - <complex>12.34</complex> - <complex>0.12</complex> - <complex>12.13</complex> - <complex>123.1</complex> - <complex>1234</complex> - <complex>-12.12</complex> - <complex>-123.1</complex> - </t:root> diff --git a/tests/cxx/tree/prefix/output b/tests/cxx/tree/prefix/output index 4f40f49..9801a23 100644 --- a/tests/cxx/tree/prefix/output +++ b/tests/cxx/tree/prefix/output @@ -1,22 +1,18 @@ <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <p1:root xmlns:p1="test"> - <a xmlns:p3="bar" p3:abar="456" xmlns:p2="foo"> <p2:efoo>123</p2:efoo> </a> - <b xmlns:p2="bar"> <p2:derived> <x>1</x> <y>2</y> </p2:derived> </b> - <c xmlns:p2="foo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <p2:base xmlns:p3="bar" xsi:type="p3:derived2"> <x>1</x> <z>2</z> </p2:base> </c> - </p1:root> |