tailieunhanh - Oracle XSQL- P7

Oracle XSQL- P7Welcome to the exciting world of eXtended Structured Query Language (XSQL) development! What’s so exciting? Efficiency and ease of use. XSQL isn’t some razzle-dazzle technology to wow your users. It also isn’t the latest X standard du jour that no one can stop talking about until you ask, “But what does it do for me today?” The problem with all of the great stuff out there is that no one technology does it all. | 100 Chapter 6 Parameter XML Representation In the previous examples you saw how to reference parameters from your XSQL page. But what if you want the parameters to be part of the result This is the job of two actions xsql include-request-param and xsql include-request-params . This action outputs all of the parameters to the XML. Here is an example of xsql include -request-param xml version page xmlns xsql urn oracle-xsql xsql include-param name conn xsql include-param name fields xsql include-param name tables page Now save this as . You can either pass the parameters in on the URL as before or change the action of your form to . In either case this page should produce the result shown in Figure . Figure XML representation of parameters. XSQL Parameters 101 In this case you have to specify the parameters one at a time. If you know that you want all of the parameters or if you want so many parameters that it s easier to just grab all of them then you can use the xsql include-request params action. You can create the following XSQL page as . With only one line of code you ll have every parameter xml version page xmlns xsql urn oracle-xsql xsql include-request-params page The result for this when you use the same parameters as before is shown in Figure . The XML schema is very simple. Even if there are no parameters at all you ll always have the following skeleton request parameters parameters session session cookies cookies request Figure Result of xsql include-request-params 102 Chapter 6 The parameters are children of the respective elements. As you can see in the previous example parameters received from forms are children of the parameters element. For each parameter a child element with the same name as the parameter encloses the parameter s value. This works the same for session parameters and cookies. Here is an example where two of each are set request .

TỪ KHÓA LIÊN QUAN