﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-Sun River-随笔分类-XML</title><link>http://www.blogjava.net/SunRiver/category/15317.html</link><description>Topics about J2EE XML AJAX SOA DB etc.</description><language>zh-cn</language><lastBuildDate>Wed, 28 Feb 2007 03:11:33 GMT</lastBuildDate><pubDate>Wed, 28 Feb 2007 03:11:33 GMT</pubDate><ttl>60</ttl><item><title>New Questions</title><link>http://www.blogjava.net/SunRiver/archive/2006/11/27/83710.html</link><dc:creator>Sun River</dc:creator><author>Sun River</author><pubDate>Mon, 27 Nov 2006 01:26:00 GMT</pubDate><guid>http://www.blogjava.net/SunRiver/archive/2006/11/27/83710.html</guid><wfw:comment>http://www.blogjava.net/SunRiver/comments/83710.html</wfw:comment><comments>http://www.blogjava.net/SunRiver/archive/2006/11/27/83710.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/SunRiver/comments/commentRss/83710.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/SunRiver/services/trackbacks/83710.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
				<b>
						<span style="COLOR: black">Tech Tips Quiz</span>
				</b>
				<span style="COLOR: black">
						<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
						<o:p>
						</o:p>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">Over the years, the Enterprise Java Technologies Tech Tips have covered a wide variety of enterprise Java technology topics. Here's a short quiz that tests your knowledge of some topics covered in past Tech Tips. You can find the answers at the end of the quiz. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l1 level1 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">1.<span style="FONT: 7pt 'Times New Roman'">                  </span></span>
				</span>
				<span style="COLOR: black">Which of the following inheritance strategies is not supported by the Java Persistence API? <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">a.<span style="FONT: 7pt 'Times New Roman'">                               </span></span>
				</span>
				<span style="COLOR: black">Single Table Per Class Hierarchy <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">b.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">Joined Subclass <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">c.<span style="FONT: 7pt 'Times New Roman'">                               </span></span>
				</span>
				<span style="COLOR: black">Single Table Per Class <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">d.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">Multiple Hierarchy <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l1 level1 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">2.<span style="FONT: 7pt 'Times New Roman'">                  </span></span>
				</span>
				<span style="COLOR: black">What is the primary purpose of the </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">javax.xml.ws.Provider</font>
						</span>
				</code>
				<span style="COLOR: black">API? <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">a.<span style="FONT: 7pt 'Times New Roman'">                               </span></span>
				</span>
				<span style="COLOR: black">Binds XML to Java objects. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">b.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">Allows web services to work directly with messages. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">c.<span style="FONT: 7pt 'Times New Roman'">                               </span></span>
				</span>
				<span style="COLOR: black">Simplifies WSDL creation. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">d.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">Specifies the URL of a web service provider. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">e.<span style="FONT: 7pt 'Times New Roman'">                               </span></span>
				</span>
				<span style="COLOR: black">None of the above <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l1 level1 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">3.<span style="FONT: 7pt 'Times New Roman'">                  </span></span>
				</span>
				<span style="COLOR: black">Which of the following statements about the </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">ELResolver</font>
						</span>
				</code>
				<span style="COLOR: black">class is true? <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">a.<span style="FONT: 7pt 'Times New Roman'">                               </span></span>
				</span>
				<span style="COLOR: black">In Java EE 5, the classes </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">VariableResolver</font>
						</span>
				</code>
				<span style="COLOR: black">and </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">PropertyResolver</font>
						</span>
				</code>
				<span style="COLOR: black">have been merged into the </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">ELResolver</font>
						</span>
				</code>
				<span style="COLOR: black">class. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">b.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">The way an expression is resolved can be customized by adding custom </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">ELResolver</font>
						</span>
				</code>
				<span style="COLOR: black">subclasses to the </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">ELResolver</font>
						</span>
				</code>
				<span style="COLOR: black">chain. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">c.<span style="FONT: 7pt 'Times New Roman'">                               </span></span>
				</span>
				<span style="COLOR: black">To make an </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">ELResolver</font>
						</span>
				</code>
				<span style="COLOR: black">class visible to the Java EE runtime, it must be declared in an application configuration resource file. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">d.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">All of the above. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l1 level1 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">4.<span style="FONT: 7pt 'Times New Roman'">                  </span></span>
				</span>
				<span style="COLOR: black">What does the </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">&lt;service-name-pattern&gt;</font>
						</span>
				</code>
				<span style="COLOR: black">element in the following set of XML statements do: </span>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">
						<font color="#666666">
								<br />        <span style="mso-spacerun: yes">    </span>&lt;handler-chains xmlns="http://java.sun.com/xml/ns/javaee"&gt;<br /></font>
				</span>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">
						<font color="#666666">        <span style="mso-spacerun: yes">      </span>&lt;handler-chain&gt;\<br /></font>
				</span>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">
						<font color="#666666">     <span style="mso-spacerun: yes">          </span>&lt;service-name-pattern </font>
				</span>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">
						<font color="#666666">
								<span style="mso-spacerun: yes"> </span>xmlns:ns1="http://example.com/handlers"&gt;<o:p></o:p></font>
						<br />    </span>
				<span lang="DA" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: DA">
						<font color="#666666">     <span style="mso-spacerun: yes">      </span>ns1:HelloService</font> </span>
				<span lang="DA" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: DA">    <font color="#666666"><br />        <span style="mso-spacerun: yes">          </span>&lt;/service-name-pattern&gt;<o:p></o:p></font><br />    </span>
				<span lang="DA" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: DA">    <font color="#666666">       <span style="mso-spacerun: yes">        </span>&lt;handler/&gt;<o:p></o:p></font><br />    </span>
				<span lang="DA" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: DA">    <font color="#666666">       <span style="mso-spacerun: yes">        </span>&lt;handler/&gt;<o:p></o:p></font><br />    </span>
				<span lang="DA" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: DA">
						<font color="#666666">        <span style="mso-spacerun: yes">       </span>&lt;/handler-chain&gt;<o:p></o:p></font>
						<br />
				</span>
				<span lang="DA" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: DA">    <font color="#666666">       <span style="mso-spacerun: yes">   </span>&lt;/handler-chains&gt;<o:p></o:p></font><br />    </span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">a.<span style="FONT: 7pt 'Times New Roman'">                               </span></span>
				</span>
				<span style="COLOR: black">Applies the handlers specified in the </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">&lt;handler-chain&gt;</font>
						</span>
				</code>
				<span style="COLOR: black">element to the service with the Java EE qname </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">{http://example.com/handlers}HelloService</font>
						</span>
				</code>
				<span style="COLOR: black">. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">b.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">Adds a service named </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">HelloService</font>
						</span>
				</code>
				<span style="COLOR: black">to the handlers specified in the </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">&lt;handler-chain&gt;</font>
						</span>
				</code>
				<span style="COLOR: black">element. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">c.<span style="FONT: 7pt 'Times New Roman'">                               </span></span>
				</span>
				<span style="COLOR: black">Applies the handlers specified in the </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">&lt;handler-chain&gt;</font>
						</span>
				</code>
				<span style="COLOR: black">element to all ports whose names begin with </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">HelloService</font>
						</span>
				</code>
				<span style="COLOR: black">. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">d.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">None of the above. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in">
				<span style="COLOR: black">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l1 level1 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">5.<span style="FONT: 7pt 'Times New Roman'">                  </span></span>
				</span>
				<span style="COLOR: black">What role does an </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">XMLHttpRequest</font>
						</span>
				</code>
				<span style="COLOR: black">object play in an AJAX-enabled application? <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">a.<span style="FONT: 7pt 'Times New Roman'">                               </span></span>
				</span>
				<span style="COLOR: black">It's used as a proxy to transmit requests to a server in a different domain. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">b.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">It's used to identify a filter for exchange of XML-based </span>
				<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /?>
				<st1:city>
						<st1:place>
								<span style="COLOR: black">AJAX</span>
						</st1:place>
				</st1:city>
				<span style="COLOR: black">requests between the client and server. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">c.<span style="FONT: 7pt 'Times New Roman'">                               </span></span>
				</span>
				<span style="COLOR: black">It's used to transmit </span>
				<st1:city>
						<st1:place>
								<span style="COLOR: black">AJAX</span>
						</st1:place>
				</st1:city>
				<span style="COLOR: black">requests asynchronously over HTTP to a server-side component. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l1 level2 lfo1">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">d.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">There is no such thing as an </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">XMLHttpRequest</font>
						</span>
				</code>
				<span style="COLOR: black">object. <o:p></o:p></span>
		</p>
		<p class="bodytext" style="MARGIN: 0in 0in 0pt">
				<b>
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">Answers</span>
				</b>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l0 level1 lfo2">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">1.<span style="FONT: 7pt 'Times New Roman'">                  </span></span>
				</span>
				<span style="COLOR: black">Which of the following inheritance strategies is not supported by the Java Persistence API?<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l0 level2 lfo2">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">d.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">Multiple Hierarchy. The Java Persistence API allows for three different inheritance strategies that dictate how subclasses are mapped to database tables. The three strategies are single table per class hierarchy, joined subclass, and single table per class. </span>
				<span style="COLOR: black">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in">
				<span style="COLOR: black">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l0 level1 lfo2">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">2.<span style="FONT: 7pt 'Times New Roman'">                  </span></span>
				</span>
				<span style="COLOR: black">What is the primary purpose of the </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">javax.xml.ws.Provider</font>
						</span>
				</code>
				<span style="COLOR: black">API?<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l0 level2 lfo3">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">b.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">Allows web services to work directly with messages. The <a href="http://jcp.org/en/jsr/detail?id=224"><span style="mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font face="Arial" color="#3e6b8a">JAX-WS 2.0 specification</font></span></a> provides two new APIs which make it possible for web services to work with messages or message payloads. The APIs are </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">javax.xml.ws.Provider</font>
						</span>
				</code>
				<span style="COLOR: black">and </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">java.xml.ws.Dispatch</font>
						</span>
				</code>
				<span style="COLOR: black">. </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">Provider</font>
						</span>
				</code>
				<span style="COLOR: black">is a server-side API, while </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">Dispatch</font>
						</span>
				</code>
				<span style="COLOR: black">is a client-side API. <br /></span>
				<span style="COLOR: black">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l0 level1 lfo3">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">3.<span style="FONT: 7pt 'Times New Roman'">                  </span></span>
				</span>
				<span style="COLOR: black">Which of the following statements about the </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">ELResolver</font>
						</span>
				</code>
				<span style="COLOR: black">class is true?<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l0 level2 lfo4">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">d.<span style="FONT: 7pt 'Times New Roman'">                              </span></span>
				</span>
				<span style="COLOR: black">All of the above. For more about the </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">ELResolver</font>
						</span>
				</code>
				<span style="COLOR: black">class, especially how to create a customized </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">ELResolver</font>
						</span>
				</code>
				<span style="COLOR: black">. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in">
				<span style="COLOR: black">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
				<span style="COLOR: black">4. What does the </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">&lt;service-name-pattern&gt;</font>
						</span>
				</code>
				<span style="COLOR: black">element in the following set of XML statements do: <br /></span>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">
						<font color="#666666">        <span style="mso-spacerun: yes">    </span>&lt;handler-chains xmlns="http://java.sun.com/xml/ns/javaee"&gt;</font>
				</span>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">
						<font color="#666666">   <span style="mso-spacerun: yes">    </span><br />        <span style="mso-spacerun: yes">    </span>&lt;handler-chain&gt;</font>
				</span>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">      <font color="#666666"><br />        <span style="mso-spacerun: yes">         </span>&lt;service-name-pattern <o:p></o:p></font><br />    </span> <span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"><font color="#666666"><span style="mso-spacerun: yes">              </span>xmlns:ns1="http://example.com/handlers"&gt;</font></span><span lang="DA" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: DA">     <font color="#666666"><br />        <span style="mso-spacerun: yes">              </span>ns1:HelloService</font></span><span lang="DA" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: DA"><br />     <font color="#666666">        <span style="mso-spacerun: yes">          </span>&lt;/service-name-pattern&gt;</font>  </span><br />  <span lang="DA" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: DA"><font color="#666666">      <span style="mso-spacerun: yes">        </span>&lt;handler/&gt;</font></span>  <span lang="DA" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: DA"><font color="#666666"><br />        <span style="mso-spacerun: yes">        </span>&lt;handler/&gt;<o:p></o:p></font><br />    </span><span lang="DA" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: DA"><font color="#666666">      <span style="mso-spacerun: yes">       </span>&lt;/handler-chain&gt;<o:p></o:p></font><br />    </span><span lang="DA" style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-ansi-language: DA"><font color="#666666">    <span style="mso-spacerun: yes">   </span>&lt;/handler-chains&gt;<o:p></o:p></font><br />    </span><span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore">e.<span style="FONT: 7pt 'Times New Roman'">       </span></span></span><span style="COLOR: black">Applies the handlers in the specified in the </span><code><span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt"><font color="#666666">&lt;handler-chain&gt;</font></span></code><span style="COLOR: black">element to the service with the Java EE qname </span><code><span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt"><font color="#666666">{http://example.com/handlers}HelloService</font></span></code><span style="COLOR: black">. The </span><code><span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt"><font color="#666666">&lt;service-name-pattern&gt;</font></span></code><span style="COLOR: black">element applies handlers to specific services. Handlers are interceptors that can be easily plugged into the JAX-WS 2.0 runtime environment to do additional processing of inbound and outbound messages. A handler chain is an ordered list of handlers that is used for configuring handlers. </span><span style="COLOR: black">. <o:p></o:p></span></p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.25in">
				<span style="COLOR: black">5.What role does an </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">XMLHttpRequest</font>
						</span>
				</code>
				<span style="COLOR: black">object play in an AJAX-enabled application?<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list 1.0in; mso-list: l0 level2 lfo6">
				<span style="COLOR: black; mso-fareast-font-family: 'Times New Roman'">
						<span style="mso-list: Ignore">  c.<span style="FONT: 7pt 'Times New Roman'">      </span></span>
				</span>
				<span style="COLOR: black">It's used to transmit </span>
				<st1:city>
						<st1:place>
								<span style="COLOR: black">AJAX</span>
						</st1:place>
				</st1:city>
				<span style="COLOR: black">requests asynchronously over HTTP to a server-side component. An </span>
				<code>
						<span style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt">
								<font color="#666666">XMLHttpRequest</font>
						</span>
				</code>
				<span style="COLOR: black">object plays a central role in the </span>
				<st1:city>
						<st1:place>
								<span style="COLOR: black">AJAX</span>
						</st1:place>
				</st1:city>
				<span style="COLOR: black">methodology as the means of interaction between the client and server-side component that processes </span>
				<st1:city>
						<st1:place>
								<span style="COLOR: black">AJAX</span>
						</st1:place>
				</st1:city>
				<span style="COLOR: black">requests. </span>
				<span style="COLOR: black">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
				<span style="COLOR: black">
						<script type="text/javascript">
								<!-- Hide script from older browsers
// Popup window function
function onRateSubmitHandler()
{
var w = window.open("","rr","width=800,height=600,status=no,toolbar=no,scrollbars=yes"); 
w.setTimeout("window.close();", 30000 );
return true;
}
// End of javascript 
-->
						</script>
				</span>
				<o:p> </o:p>
		</p>
<img src ="http://www.blogjava.net/SunRiver/aggbug/83710.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SunRiver/" target="_blank">Sun River</a> 2006-11-27 09:26 <a href="http://www.blogjava.net/SunRiver/archive/2006/11/27/83710.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>2006-11-26</title><link>http://www.blogjava.net/SunRiver/archive/2006/11/27/83694.html</link><dc:creator>Sun River</dc:creator><author>Sun River</author><pubDate>Mon, 27 Nov 2006 00:00:00 GMT</pubDate><guid>http://www.blogjava.net/SunRiver/archive/2006/11/27/83694.html</guid><wfw:comment>http://www.blogjava.net/SunRiver/comments/83694.html</wfw:comment><comments>http://www.blogjava.net/SunRiver/archive/2006/11/27/83694.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/SunRiver/comments/commentRss/83694.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/SunRiver/services/trackbacks/83694.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Part																																																																		I.																												XSLT Programming												 								1)   What is the exac...&nbsp;&nbsp;<a href='http://www.blogjava.net/SunRiver/archive/2006/11/27/83694.html'>阅读全文</a><img src ="http://www.blogjava.net/SunRiver/aggbug/83694.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SunRiver/" target="_blank">Sun River</a> 2006-11-27 08:00 <a href="http://www.blogjava.net/SunRiver/archive/2006/11/27/83694.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>2006-11-26</title><link>http://www.blogjava.net/SunRiver/archive/2006/11/27/83692.html</link><dc:creator>Sun River</dc:creator><author>Sun River</author><pubDate>Sun, 26 Nov 2006 21:26:00 GMT</pubDate><guid>http://www.blogjava.net/SunRiver/archive/2006/11/27/83692.html</guid><wfw:comment>http://www.blogjava.net/SunRiver/comments/83692.html</wfw:comment><comments>http://www.blogjava.net/SunRiver/archive/2006/11/27/83692.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/SunRiver/comments/commentRss/83692.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/SunRiver/services/trackbacks/83692.html</trackback:ping><description><![CDATA[1). <font face="Arial" size="1"><font face="Verdana" size="3">Processing (parsing) XML documents using: <br /></font></font><font face="Verdana">   - Document Object Model (DOM)<br />   - Simple API for XML (SAX)<br /></font><font face="Verdana">   Transforming XML documents using <br />   -</font><font size="2"><font face="Verdana" size="3"> XSL/XSLT<br />   - XPath<br /></font><font face="Arial">2). </font><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><b><span style="COLOR: #65659b; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Arial,Bold'"><font size="2"><font size="4">Steps for DOM Parsing<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?><o:p></o:p></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"><font size="3">1. Tell the system which parser you will use<o:p></o:p></font></span></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"><font size="3">2. Create a JAXP document builder<o:p></o:p></font></span></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"><font size="3">3. Invoke the parser to create a Document representing an XML<o:p></o:p></font></span></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"><font size="3">document<o:p></o:p></font></span></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"><font size="3">4. Normalize the tree<o:p></o:p></font></span></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"><font size="3">5. Obtain the root node of the tree<o:p></o:p></font></span></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><font size="3"><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">6. Examine and modify properties of the node</span><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: 'Arial,Bold'"><o:p></o:p></span></font></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><o:p><font face="Times New Roman" size="3"> <br />3). </font></o:p></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><b><span style="COLOR: #65659b; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Arial,Bold'">Steps for SAX Parsing<o:p></o:p></span></b></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">1. Tell the system which parser you want to use<o:p></o:p></span></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">2. Create a parser instance<o:p></o:p></span></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">3. Create a content handler to respond to parsing events<o:p></o:p></span></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">4. Invoke the parser with the designated content handler and<o:p></o:p></span></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">document</span><span style="FONT-FAMILY: Verdana; mso-bidi-font-family: 'Arial,Bold'"><o:p></o:p></span></p><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"></p></font><img src ="http://www.blogjava.net/SunRiver/aggbug/83692.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SunRiver/" target="_blank">Sun River</a> 2006-11-27 05:26 <a href="http://www.blogjava.net/SunRiver/archive/2006/11/27/83692.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>2006-11-26: Questions </title><link>http://www.blogjava.net/SunRiver/archive/2006/11/27/83684.html</link><dc:creator>Sun River</dc:creator><author>Sun River</author><pubDate>Sun, 26 Nov 2006 16:48:00 GMT</pubDate><guid>http://www.blogjava.net/SunRiver/archive/2006/11/27/83684.html</guid><wfw:comment>http://www.blogjava.net/SunRiver/comments/83684.html</wfw:comment><comments>http://www.blogjava.net/SunRiver/archive/2006/11/27/83684.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/SunRiver/comments/commentRss/83684.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/SunRiver/services/trackbacks/83684.html</trackback:ping><description><![CDATA[
		<p>1). <font face="Times New Roman">What is a document type definition and what is its purpose in XML? <font face="Times New Roman">Explain the difference between a </font><i><font face="Times New Roman">well-formed </font></i></font><font face="Times New Roman">and a </font><i><font face="Times New Roman">valid </font></i><font face="Times New Roman">XML document.<br /></font>Answer: The purpose of a DTD is to define the legal building blocks of an XML document. It defines the document structure with a list of legal elements. A DTD can be declared inline in your XML document, or as an external reference. Two definitions: <br />   -).A <em class="firstterm">well-formed</em> file is one that obeys the general XML rules for tags: tags must be properly nested, opening and closing tags must be balanced, and empty tags must end with <code class="code">'/&gt;'</code>.<br />   -). A <em class="firstterm">valid</em> file is not only well-formed, but it must also conform to a publicly available DTD that specifies which tags it uses, what attributes those tags can contain, and which tags can occur inside which other tags, among other properties.<br /><br />2). External DTD:<br />&lt;?xml version="1.0"?&gt;<br />&lt;!DOCTYPE note SYSTEM "note.dtd"&gt;<br /><br />3). <b><span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial"><font size="3">Minimal but Complete XSLT<span style="mso-spacerun: yes">  </span>Stylesheet<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?><o:p></o:p></font></span></b></p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
				<b>
						<span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">
								<font size="3">&lt;?xml version="1.0"?&gt;<o:p></o:p></font>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
				<font size="3">
						<b>
								<span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">
										<span style="mso-spacerun: yes">   </span>&lt;</span>
						</b>
						<b>
								<span style="FONT-SIZE: 14pt; COLOR: #ff3700; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">xsl:stylesheet </span>
						</b>
						<b>
								<span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">version="1.0"<o:p></o:p></span>
						</b>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
				<b>
						<span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">
								<font size="3">
										<span style="mso-spacerun: yes">            </span>xmlns:xsl="http://www.w3.org/1999/</font>
						</span>
				</b>
				<b>
						<span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">
								<font size="3">XSL/Transform"&gt;<o:p></o:p></font>
						</span>
				</b>
		</p>
		<p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
				<font size="2">
						<b>
								<span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">&lt;</span>
						</b>
						<b>
								<span style="FONT-SIZE: 14pt; COLOR: #ff3700; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">/xsl:stylesheet</span>
						</b>
						<b>
								<span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">&gt;</span>
						</b>
				</font>
				<br />
				<br />4). Using XSLT, how would you extract a specfic attribute from an element in an XML document?<br />Ans: Extract attributes from XML data<br />   &lt;xsl:template match="element-name"&gt;<br />     Attribute Value:<br />        &lt;xsl:value-of select="@attribute" /&gt;<br />         &lt;xsl:apply-templates/&gt;<br />    &lt;/xsl:template&gt;<br /><br />5). <font size="3"><span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial; mso-bidi-font-weight: bold">Templates</span><span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana">--</span><span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">Controls which output is created from which input<o:p></o:p></span></font></p>
		<p style="MARGIN: 0in 0in 0pt">
				<font size="3">
						<span style="FONT-SIZE: 14pt; COLOR: #ff3700; FONT-FAMILY: Verdana">--"</span>
						<i>
								<span style="FONT-SIZE: 14pt; COLOR: #ff3700; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">xsl:template </span>
						</i>
						<span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">element form<o:p></o:p></span>
				</font>
		</p>
		<p style="MARGIN: 0in 0in 0pt">
				<font size="3">
						<span style="FONT-SIZE: 14pt; COLOR: #ff3700; FONT-FAMILY: Verdana">--"</span>
						<i>
								<span style="FONT-SIZE: 14pt; COLOR: #ff3700; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">match </span>
						</i>
						<span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">attribute contains an <span style="COLOR: #ff3700">Xpath expression </span><span style="COLOR: black">(X</span>path expression identifies <span style="COLOR: #ff3700">input node set </span>it matches)<o:p></o:p></span>
				</font>
		</p>
		<p style="MARGIN: 0in 0in 0pt">
				<font size="3">
						<span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana">--"</span>
						<span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">For each node in the node set, the<o:p></o:p></span>
				</font>
		</p>
		<p style="MARGIN: 0in 0in 0pt">
				<font size="2">
						<font size="3">
								<span style="FONT-SIZE: 14pt; COLOR: #ff3700; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">template contents </span>
								<span style="FONT-SIZE: 14pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">(things between xsl:template tags) are instantiated and inserted into the output tree.</span>
						</font>
						<br />
						<font face="Arial">
								<br />6). <font face="Times New Roman">Attributes</font></font>
				</font>
		</p>
		<p>In the DTD, XML element attributes are declared with an ATTLIST declaration. An attribute declaration has the following syntax:</p>
		<p style="MARGIN: 0in 0in 0pt">
		</p>
		<table bgcolor="#efe7d6" border="1">
				<tbody>
						<tr>
								<td width="100%">
										<pre>&lt;!ATTLIST element-name attribute-name attribute-type default-value&gt;</pre>
								</td>
						</tr>
				</tbody>
		</table>
		<br />As you can see from the syntax above, the ATTLIST declaration defines the element which can have the attribute, the name of the attribute, the type of the attribute, and the default attribute value. <p>The <b>attribute-type</b> can have the following values:</p><p style="MARGIN: 0in 0in 0pt"></p><table bgcolor="#efe7d6" border="1"><tbody><tr><th align="left" width="25%">Value</th><th align="left" width="75%">Explanation</th></tr><tr><td><pre>CDATA</pre></td><td><pre>The value is character data</pre></td></tr><tr><td><pre>(eval|eval|..)</pre></td><td><pre>The value must be an enumerated value</pre></td></tr><tr><td><pre>ID</pre></td><td><pre>The value is an unique id </pre></td></tr><tr><td><pre>IDREF</pre></td><td><pre>The value is the id of another element</pre></td></tr><tr><td><pre>IDREFS</pre></td><td><pre>The value is a list of other ids</pre></td></tr><tr><td><pre>NMTOKEN</pre></td><td><pre>The value is a valid XML name</pre></td></tr><tr><td><pre>NMTOKENS</pre></td><td><pre>The value is a list of valid XML names</pre></td></tr><tr><td><pre>ENTITY</pre></td><td><pre>The value is an entity </pre></td></tr><tr><td><pre>ENTITIES</pre></td><td><pre>The value is a list of entities</pre></td></tr><tr><td><pre>NOTATION</pre></td><td><pre>The value is a name of a notation</pre></td></tr><tr><td><pre>xml:</pre></td><td><pre>The value is predefined</pre></td></tr></tbody></table><p>The <b>attribute-default-value</b> can have the following values:</p><p style="MARGIN: 0in 0in 0pt"></p><table bgcolor="#efe7d6" border="1"><tbody><tr><th align="left" width="25%">Value</th><th align="left" width="75%">Explanation</th></tr><tr><td><pre>#DEFAULT value</pre></td><td><pre>The attribute has a default value</pre></td></tr><tr><td><pre>#REQUIRED</pre></td><td><pre>The attribute value must be included in the element</pre></td></tr><tr><td><pre>#IMPLIED</pre></td><td><pre>The attribute does not have to be included</pre></td></tr><tr><td><pre>#FIXED value</pre></td><td><pre>The attribute value is fixed</pre></td></tr></tbody></table><br /><hr /><h2>Attribute declaration example</h2><p style="MARGIN: 0in 0in 0pt"></p><table bgcolor="#efe7d6" border="1"><tbody><tr><td width="100%"><pre>DTD example:
&lt;!ELEMENT square EMPTY&gt;
  &lt;!ATTLIST square width CDATA "0"&gt;

XML example:
&lt;square width="100"&gt;&lt;/square&gt;</pre></td></tr></tbody></table><br />In the above example the element square is defined to be an empty element with the attributes width of  type CDATA. The width attribute has a default value of 0.  <hr /><h2>Default attribute value</h2><p style="MARGIN: 0in 0in 0pt"></p><table bgcolor="#efe7d6" border="1"><tbody><tr><td width="100%"><pre>Syntax:
&lt;!ATTLIST element-name attribute-name CDATA "default-value"&gt;

DTD example:
&lt;!ATTLIST payment type CDATA "check"&gt;

XML example:
&lt;payment type="check"&gt;</pre></td></tr></tbody></table><br />Specifying a default value for an attribute, assures that the attribute will get a value even if the author of the XML document didn't include it. <hr /><h2>Implied attribute</h2><p style="MARGIN: 0in 0in 0pt"></p><table bgcolor="#efe7d6" border="1"><tbody><tr><td width="100%"><pre>Syntax:
&lt;!ATTLIST element-name attribute-name attribute-type #IMPLIED&gt;</pre><pre>DTD example:
&lt;!ATTLIST contact fax CDATA #IMPLIED&gt;

XML example:
&lt;contact fax="555-667788"&gt;</pre></td></tr></tbody></table><br />Use an implied attribute if you don't want to force the author to include an attribute and you don't have an option for a default value either.  <hr /><h2>Required attribute</h2><p style="MARGIN: 0in 0in 0pt"></p><table bgcolor="#efe7d6" border="1"><tbody><tr><td width="100%"><pre>Syntax:
&lt;!ATTLIST element-name attribute_name attribute-type #REQUIRED&gt;</pre><pre>DTD example:
&lt;!ATTLIST person number CDATA #REQUIRED&gt;

XML example:
&lt;person number="5677"&gt;</pre></td></tr></tbody></table><br />Use a required attribute if you don't have an option for a default value, but still want to force the attribute to be present. <hr /><h2>Fixed attribute value</h2><p style="MARGIN: 0in 0in 0pt"></p><table bgcolor="#efe7d6" border="1"><tbody><tr><td width="100%"><pre>Syntax:
&lt;!ATTLIST element-name attribute-name attribute-type #FIXED "value"&gt;</pre><pre>DTD example:
&lt;!ATTLIST sender company CDATA #FIXED "Microsoft"&gt;


XML example:
&lt;sender company="Microsoft"&gt;</pre></td></tr></tbody></table><br />Use a fixed attribute value when you want an attribute to have a fixed value without allowing the author to change it. If an author includes another value, the XML parser will return an error. <hr /><h2>Enumerated attribute values</h2><p style="MARGIN: 0in 0in 0pt"></p><table bgcolor="#efe7d6" border="1"><tbody><tr><td width="100%"><pre>Syntax:
&lt;!ATTLIST element-name attribute-name (eval|eval|..) default-value&gt;</pre><pre>DTD example:
&lt;!ATTLIST payment type (check|cash) "cash"&gt;

XML example:
&lt;payment type="check"&gt;
or
&lt;payment type="cash"&gt;</pre></td></tr></tbody></table><img src ="http://www.blogjava.net/SunRiver/aggbug/83684.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SunRiver/" target="_blank">Sun River</a> 2006-11-27 00:48 <a href="http://www.blogjava.net/SunRiver/archive/2006/11/27/83684.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>