1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
Testsuite: org.simpleframework.xml.core.PathAsNamespacePrefixTest
Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.154 sec
------------- Standard Output ---------------
<p:pathWithPrefix xmlns:p="http://www.x.com/y">
<x>
<y>
<p:z>
<p:name>tim</p:name>
</p:z>
</y>
</x>
</p:pathWithPrefix>
<p:pathWithPrefix xmlns:p="http://www.x.com/y">
<x>
<y>
<p:z>
<p:name>tim</p:name>
</p:z>
</y>
</x>
</p:pathWithPrefix><p:pathWithPrefix xmlns:p="http://www.x.com/y">
<x>
<y>
<p:z>
<p:name>tim</p:name>
</p:z>
</y>
</x>
</p:pathWithPrefix>
<p:path-with-prefix ID="0" xmlns:p="http://www.x.com/y">
<x>
<y>
<p:z>
<!-- java.lang.String -->
<p:name ID="1">tim</p:name>
</p:z>
</y>
</x>
</p:path-with-prefix>>>>>> ELEMENT=[element path-with-prefix]
>>>>> TYPE=[class org.simpleframework.xml.core.PathAsNamespacePrefixTest$PathWithPrefix]
>>>>> SOURCE=[class com.sun.xml.internal.stream.events.StartElementEvent]
<p:PathWithPrefix ID="0" xmlns:p="http://www.x.com/y">
<X>
<Y>
<p:Z>
<!-- java.lang.String -->
<p:Name ID="1">tim</p:Name>
</p:Z>
</Y>
</X>
</p:PathWithPrefix>>>>>> ELEMENT=[element PathWithPrefix]
>>>>> TYPE=[class org.simpleframework.xml.core.PathAsNamespacePrefixTest$PathWithPrefix]
>>>>> SOURCE=[class com.sun.xml.internal.stream.events.StartElementEvent]
<p:bringPrefixInScope xmlns:p="http://www.x.com/p">
<example>
<x>
<y>
<p:z>
<name xmlns="http://www.x.com/y">tim</name>
</p:z>
</y>
</x>
</example>
</p:bringPrefixInScope>
<p:bringPrefixInScope xmlns:p="http://www.x.com/p">
<example>
<x>
<y>
<p:z>
<name xmlns="http://www.x.com/y">tim</name>
</p:z>
</y>
</x>
</example>
</p:bringPrefixInScope><p:bringPrefixInScope xmlns:p="http://www.x.com/p">
<example>
<x>
<y>
<p:z>
<name xmlns="http://www.x.com/y">tim</name>
</p:z>
</y>
</x>
</example>
</p:bringPrefixInScope>
<p:bring-prefix-in-scope ID="0" xmlns:p="http://www.x.com/p">
<!-- org.simpleframework.xml.core.PathAsNamespacePrefixTest$PathWithPrefixOutOfScope -->
<example ID="1">
<x>
<y>
<p:z>
<!-- java.lang.String -->
<name ID="2" xmlns="http://www.x.com/y">tim</name>
</p:z>
</y>
</x>
</example>
</p:bring-prefix-in-scope>>>>>> ELEMENT=[element bring-prefix-in-scope]
>>>>> TYPE=[class org.simpleframework.xml.core.PathAsNamespacePrefixTest$BringPrefixInScope]
>>>>> SOURCE=[class com.sun.xml.internal.stream.events.StartElementEvent]
<p:BringPrefixInScope ID="0" xmlns:p="http://www.x.com/p">
<!-- org.simpleframework.xml.core.PathAsNamespacePrefixTest$PathWithPrefixOutOfScope -->
<Example ID="1">
<X>
<Y>
<p:Z>
<!-- java.lang.String -->
<Name ID="2" xmlns="http://www.x.com/y">tim</Name>
</p:Z>
</Y>
</X>
</Example>
</p:BringPrefixInScope>>>>>> ELEMENT=[element BringPrefixInScope]
>>>>> TYPE=[class org.simpleframework.xml.core.PathAsNamespacePrefixTest$BringPrefixInScope]
>>>>> SOURCE=[class com.sun.xml.internal.stream.events.StartElementEvent]
------------- ---------------- ---------------
------------- Standard Error -----------------
org.simpleframework.xml.core.ElementException: Namespace prefix 'p' in class org.simpleframework.xml.core.PathAsNamespacePrefixTest$PathWithPrefixOutOfScope is not in scope
at org.simpleframework.xml.core.Composite.writeSection(Composite.java:998)
at org.simpleframework.xml.core.Composite.writeElements(Composite.java:1087)
at org.simpleframework.xml.core.Composite.writeSection(Composite.java:1004)
at org.simpleframework.xml.core.Composite.writeElements(Composite.java:1087)
at org.simpleframework.xml.core.Composite.writeSection(Composite.java:1004)
at org.simpleframework.xml.core.Composite.writeElements(Composite.java:1087)
at org.simpleframework.xml.core.Composite.writeSection(Composite.java:1004)
at org.simpleframework.xml.core.Composite.write(Composite.java:975)
at org.simpleframework.xml.core.Composite.write(Composite.java:952)
at org.simpleframework.xml.core.Traverser.write(Traverser.java:236)
at org.simpleframework.xml.core.Traverser.write(Traverser.java:208)
at org.simpleframework.xml.core.Traverser.write(Traverser.java:186)
at org.simpleframework.xml.core.Persister.write(Persister.java:1180)
at org.simpleframework.xml.core.Persister.write(Persister.java:1162)
at org.simpleframework.xml.core.Persister.write(Persister.java:1140)
at org.simpleframework.xml.core.Persister.write(Persister.java:1259)
at org.simpleframework.xml.core.PathAsNamespacePrefixTest.testPathWithPrefixOufOfScope(PathAsNamespacePrefixTest.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
------------- ---------------- ---------------
Testcase: testPathWithPrefix took 0.121 sec
Testcase: testPathWithPrefixOufOfScope took 0.008 sec
Testcase: testBringPrefixInScope took 0.024 sec
Testcase: testDirectory took 0 sec
|