Mapping array of URIs

HI,
I need to map an object containing array of java.net.URI objects. Mapping must fulfill following requirements:
- values need to be visible in database (not serialized)
- ordering of elements is important
I have little control over mapped object (it's part of the interface), but I can freely manipulate database design. What would be the best way to handle this mapping?
I'm using Toplink 9.0.4.5
Regards,
Paweł

Hi,
The class is a relatively simple simple DTO, containing mostly primitive type fields (Strings, int),
public class DTO {
private String f1;
private String f2;
private java.net.URI[] addresses;
/* getters, setters, constructor &etc. */
Instances of the class are received from system's clients.There is no logical ordering rule for the elements of addresses array, but the initial ordering is significant for processing and needs to be preserved.
Regards,
Paweł

Similar Messages

  • Mapping Arrays indexing in Crystal Reports formulas and indexes

    <span style="font-size: 10pt; font-family: &#39;Times New Roman&#39;"><p style="margin: 0in 0in 0pt" class="MsoNormal">I just took a Crystal Reports Designer class today and I presented the Array Mapping technique to the instructor. Since he was very interested I decided to post it here, so more people can benefit from it.</p>  <p style="margin: 0in 0in 0pt" class="MsoNormal">This is an idea used a lot in C++. I designed a formula using two symmetric arrays. One to hold values to be used to test a condition, and a second one to hold values to be outputted when the condition is found. Since the index in the test values array for a given value to be tested matches the index of return values array of the correspondent output value, this methodology is called index mapping.</p>  <p style="margin: 0in 0in 0pt" class="MsoNormal">Here follows the code:</p>   <p style="margin: 0in 0in 0pt" class="MsoNormal">//testValues array store values to be tested in the formula</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Local StringVar Array testValues :=<span>     </span>MakeArray ( "S",<span>         </span>"M",<span>    </span><span>    </span>"L",<span>       </span>"XL");</p>  <p style="margin: 0in 0in 0pt" class="MsoNormal">//returnValues array store values to be returned by the test formula</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Local StringVar Array returnValues :=<span>   </span>MakeArray ( "Small",<span>    </span>"Medial",<span>   </span>"Large",<span>  </span>"Extra Large", </p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span>                                                    </span>"App Type not Found");</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Local NumberVar i := 1;</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Local Numbervar returnIndex := -1;</p>   <p style="margin: 0in 0in 0pt" class="MsoNormal">//Loop through the entire array for each values of the field</p><p style="margin: 0in 0in 0pt" class="MsoNormal">While<span>   </span>i <= Ubound(testValues) AND returnIndex = -1 Do(</p><p style="margin: 0in 0in 0pt" class="MsoNormal">//Actual test of the values and return bellow</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span>        </span>If ToText({CUSTOMER.SIZE}, 0) = testValues<i> Then( </p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span>            </span>returnIndex := i;);</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span>      </span><span>  </span>i := i + 1;</p><p style="margin: 0in 0in 0pt" class="MsoNormal">);</p>   <p style="margin: 0in 0in 0pt" class="MsoNormal">//If any value found return it, else return last value in the return value array</p><p style="margin: 0in 0in 0pt" class="MsoNormal">If returnIndex = -1 Then</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span>    </span>returnValues[Ubound(testValues) + 1]</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Else</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span>    </span>returnValues[returnIndex]</p>  <p style="margin: 0in 0in 0pt" class="MsoNormal">Fell free to email me if you have questions and enjoy the code...</p></span>

    Can you help with the below?
    Group on Client/Location, Brokerage Rate, Product
    Read all records for a particular group and store each different currency in an array
    On change of group display contents of the stored array. 
    e.g.
    Record 1         ABN   AM      FUTURE RATE AGREEMENT       0.012500%      DKK  
    Record 2         ABN   AM      FUTURE RATE AGREEMENT       0.012500%      EUR
    Record 3         ABN   AM      FUTURE RATE AGREEMENT       0.012500%      GBP
    Record 4         ABN   AM      FUTURE RATE AGREEMENT       0.012500%      USD
    On change of group I would like to display the following
                            ABN   AM      FUTURE RATE AGREEMENT       0.012500%      DKK   EUR    GBP    USD

  • How to map array to XML

    Hi
         i am making a Advance data grid with hierarichal data source.its working fine but now i need to use xml instead of that array.i tried alot but can not manage to conver that array to xml.so please convert that so that i can use that in my advance data grid without much change in code.
    private var masterData:Array = [
    {  TableName:"RatingDeductible",
    children:[
    {CompanyKey:1,  StateCode:"ALL", LOBKey:1, ExpiryDate:2010-12-12,  PerClaimALAEWithinLimitFactor:1.000,  PerClaimALAEOutsideLimitFactor:1.100,AggregateALAEWithinLimitFactor:1.050,AggregateALAEOu tsideLimitFactor:1.150,Deductible:1000,IdentifierKey:1},
    {CompanyKey:1,  StateCode:"ALL", LOBKey:1, ExpiryDate:2010-12-12,  PerClaimALAEWithinLimitFactor:1.000,  PerClaimALAEOutsideLimitFactor:1.100,AggregateALAEWithinLimitFactor:1.050,AggregateALAEOu tsideLimitFactor:1.150,Deductible:1000,IdentifierKey:1},
    {CompanyKey:1,  StateCode:"ALL", LOBKey:1, ExpiryDate:2010-12-12,  PerClaimALAEWithinLimitFactor:1.000,  PerClaimALAEOutsideLimitFactor:1.100,AggregateALAEWithinLimitFactor:1.050,AggregateALAEOu tsideLimitFactor:1.150,Deductible:1000,IdentifierKey:1},
    Waiting fo reply
    Thanks and Regards
      Vineet Osho

    I do not think this is a complex XML structure. All that you need to take care is about the contexts. How ever it is not possible to give u the complete mapping here. If you have tried mapping already and facing some issues.. please put it here.. so that some one can help you.
    VJ

  • Mapping Array string response from Web service

    Hi
    Need to map the response from a sync call to a WS which contains an array of strings the response message looks like:
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <SOAP-ENV:Body>
    - <rpl:readAllRecFromDQStrArrayResponse xmlns:rpl="urn:AS400DBAccessVi">
    - <rpl:Response xmlns:pns="urn:java/lang">
      <pns:String>Row 1</pns:String>
      <pns:String>Row 2</pns:String>
      <pns:String>Row 3</pns:String>
      </rpl:Response>
      </rpl:readAllRecFromDQStrArrayResponse>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
    Need to map it to the following MT:
    WSResponse
       Response String  1..unbounded

    Hi Udo
    This the the source and target:
    SOURCE:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:AS400DBAccessWsd/AS400DBAccessVi/rpc" targetNamespace="urn:AS400DBAccessWsd/AS400DBAccessVi/rpc">
    <xsd:import namespace="urn:java/lang" />
    <xsd:element xmlns:ns1="urn:java/lang" name="Response" type="ns1:ArrayOfString" />
    </xsd:schema>
    TARGET:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://dubal.ae/SOP/SD003" targetNamespace="http://dubal.ae/SOP/SD003">
    <xsd:element name="executeDQResponse" type="executeDQResponse" />
    <xsd:complexType name="executeDQResponse">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    4c98a2b0c22d11dbbd74001125bd7544
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="String" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    09d279c0c01011dbb867001641ad833b
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    Thanks

  • Supposed to be simple: XQuery issue mapping array of objects (duplicate)

    I've been having an issue having a web service return a repeating set of elements.
    The xsd seems correctly formatted with the right structure and maxOccurs set to
    ounbounded etc.
    This is the actual service:
    public RecArea[] getAllRecAreas()
    throws Exception
    RecArea[] recAreas = recAreasControl.getRecAreas();
    return recAreas;
    The RecArea class has public variables as required:
    public class RecArea {    
    public BigDecimal recareaid;
    public String recareaname;
    When I use the XQuery mapper and connect at the RecArea level and recareaname
    level, this is generated:
    declare namespace ns0 = "http://www.openuri.org/"
    declare namespace ns1 = "http://<deleted>/<deleted>/"
    <ns1:RecAreas>
    for $RecArea in $input/ns0:getAllRecAreasResult/ns0:RecArea
    return
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($RecArea/ns0:recareaname) }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    I have of course verifed in the debugger that recAreas is populated by the function
    call and has data. The response from the service is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/"></arc:RecAreas>
    In other words, it's not enumerating the recAreas.
    I also tried tying just the recareaname attribute. This creates an XQuery like
    this:
    <ns1:RecAreas>
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($input/ns0:getAllRecAreasResult/ns0:RecArea[1]/ns0:recareaname)
    }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    This looks like it wants to only return the one element.
    The result is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/">
    <arc:RecArea>
    <arc:RecAreaName></arc:RecAreaName>
    </arc:RecArea>
    </arc:RecAreas>
    My sense is that regardless of the schema, the XQueries being generated above
    are just not doing what is expected.
    I have verified that the default query works. I.E. with no schema mapping the
    results appear.
    This should be simple. What am I missing?
    Also, I would love to have some WebService examples going from database to xml
    with schemas that have repeating elements.
    Thank you kindly,
    - Thomas

    Found a bug in Workshop causing the problem:
    It generated: $input/ns0:getAllRecAreasResult/ns0:RecArea
    but should have generated
    $input/ns0:RecArea
    After scrutinizing $input it was clear that the extra token was superflouous.
    "Thomas Charuhas" <[email protected]> wrote:
    >
    I've been having an issue having a web service return a repeating set
    of elements.
    The xsd seems correctly formatted with the right structure and maxOccurs
    set to
    ounbounded etc.
    This is the actual service:
    public RecArea[] getAllRecAreas()
    throws Exception
    RecArea[] recAreas = recAreasControl.getRecAreas();
    return recAreas;
    The RecArea class has public variables as required:
    public class RecArea {    
    public BigDecimal recareaid;
    public String recareaname;
    When I use the XQuery mapper and connect at the RecArea level and recareaname
    level, this is generated:
    declare namespace ns0 = "http://www.openuri.org/"
    declare namespace ns1 = "http://<deleted>/<deleted>/"
    <ns1:RecAreas>
    for $RecArea in $input/ns0:getAllRecAreasResult/ns0:RecArea
    return
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($RecArea/ns0:recareaname) }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    I have of course verifed in the debugger that recAreas is populated by
    the function
    call and has data. The response from the service is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/"></arc:RecAreas>
    In other words, it's not enumerating the recAreas.
    I also tried tying just the recareaname attribute. This creates an XQuery
    like
    this:
    <ns1:RecAreas>
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($input/ns0:getAllRecAreasResult/ns0:RecArea[1]/ns0:recareaname)
    }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    This looks like it wants to only return the one element.
    The result is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/">
    <arc:RecArea>
    <arc:RecAreaName></arc:RecAreaName>
    </arc:RecArea>
    </arc:RecAreas>
    My sense is that regardless of the schema, the XQueries being generated
    above
    are just not doing what is expected.
    I have verified that the default query works. I.E. with no schema mapping
    the
    results appear.
    This should be simple. What am I missing?
    Also, I would love to have some WebService examples going from database
    to xml
    with schemas that have repeating elements.
    Thank you kindly,
    - Thomas

  • Supposed to be simple: XQuery issue mapping array of objects

    I've been having an issue having a web service return a repeating set of elements.
    The xsd seems correctly formatted with the right structure and maxOccurs set to
    ounbounded etc.
    This is the actual service:
    public RecArea[] getAllRecAreas()
    throws Exception
    RecArea[] recAreas = recAreasControl.getRecAreas();
    return recAreas;
    The RecArea class has public variables as required:
    public class RecArea {    
    public BigDecimal recareaid;
    public String recareaname;
    When I use the XQuery mapper and connect at the RecArea level and recareaname
    level, this is generated:
    declare namespace ns0 = "http://www.openuri.org/"
    declare namespace ns1 = "http://<deleted>/<deleted>/"
    <ns1:RecAreas>
    for $RecArea in $input/ns0:getAllRecAreasResult/ns0:RecArea
    return
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($RecArea/ns0:recareaname) }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    I have of course verifed in the debugger that recAreas is populated by the function
    call and has data. The response from the service is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/"></arc:RecAreas>
    In other words, it's not enumerating the recAreas.
    I also tried tying just the recareaname attribute. This creates an XQuery like
    this:
    <ns1:RecAreas>
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($input/ns0:getAllRecAreasResult/ns0:RecArea[1]/ns0:recareaname)
    }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    This looks like it wants to only return the one element.
    The result is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/">
    <arc:RecArea>
    <arc:RecAreaName></arc:RecAreaName>
    </arc:RecArea>
    </arc:RecAreas>
    My sense is that regardless of the schema, the XQueries being generated above
    are just not doing what is expected.
    I have verified that the default query works. I.E. with no schema mapping the
    results appear.
    This should be simple. What am I missing?
    Also, I would love to have some WebService examples going from database to xml
    with schemas that have repeating elements.
    Thank you kindly,
    - Thomas

    Hi Thomas,
    Have you tried running autotype [2] on your actual service? What does
    the types.xml file look like, could you post it?
    You might take a look at this tutorial [1]
    Sorry for the late reply,
    Bruce
    [1]
    http://e-docs.bea.com/workshop/docs81/doc/en/integration/dttutorial/tutWLIDataTransIntro.html
    [2]
    http://edocs.bea.com/wls/docs81/webserv/anttasks.html#1080062
    Thomas Charuhas wrote:
    >
    I've been having an issue having a web service return a repeating set of elements.
    The xsd seems correctly formatted with the right structure and maxOccurs set to
    ounbounded etc.
    This is the actual service:
    public RecArea[] getAllRecAreas()
    throws Exception
    RecArea[] recAreas = recAreasControl.getRecAreas();
    return recAreas;
    The RecArea class has public variables as required:
    public class RecArea {
    public BigDecimal recareaid;
    public String recareaname;
    When I use the XQuery mapper and connect at the RecArea level and recareaname
    level, this is generated:
    declare namespace ns0 = "http://www.openuri.org/"
    declare namespace ns1 = "http://<deleted>/<deleted>/"
    <ns1:RecAreas>
    for $RecArea in $input/ns0:getAllRecAreasResult/ns0:RecArea
    return
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($RecArea/ns0:recareaname) }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    I have of course verifed in the debugger that recAreas is populated by the function
    call and has data. The response from the service is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/"></arc:RecAreas>
    In other words, it's not enumerating the recAreas.
    I also tried tying just the recareaname attribute. This creates an XQuery like
    this:
    <ns1:RecAreas>
    <ns1:RecArea>
    <ns1:RecAreaName>{ data($input/ns0:getAllRecAreasResult/ns0:RecArea[1]/ns0:recareaname)
    }</ns1:RecAreaName>
    </ns1:RecArea>
    </ns1:RecAreas>
    This looks like it wants to only return the one element.
    The result is:
    <arc:RecAreas xmlns:arc="http://<deleted>/<deleted>/">
    <arc:RecArea>
    <arc:RecAreaName></arc:RecAreaName>
    </arc:RecArea>
    </arc:RecAreas>
    My sense is that regardless of the schema, the XQueries being generated above
    are just not doing what is expected.
    I have verified that the default query works. I.E. with no schema mapping the
    results appear.
    This should be simple. What am I missing?
    Also, I would love to have some WebService examples going from database to xml
    with schemas that have repeating elements.
    Thank you kindly,
    - Thomas

  • SelectBooleanCheckbox in Map or Array?

    Hi guys,
    Anybody has example on putting selectBooleanCheckbox in a Map/Array in backing bean so that in JSP page we don't need to put it like 1 by 1. For example, if I got a list of 5 facilities for selectBooleanCheckbox, I don't need to do it like the following in JSP page:
    <h:selectBooleanCheckbox id="facility1" value="#{backingBean.facility1}"/>
    <h:selectBooleanCheckbox id="facility2" value="#{backingBean.facility2}"/>
    <h:selectBooleanCheckbox id="facility3" value="#{backingBean.facility3}"/>
    <h:selectBooleanCheckbox id="facility4" value="#{backingBean.facility4}"/>
    <h:selectBooleanCheckbox id="facility5" value="#{backingBean.facility5}"/>
    where I can just loop thru the boolean[] facility in backing bean will do.
    thanks !

    Try h:dataTable.
    <h:dataTable value="#{backingBean.facilities}" var="item">
    <h:column>
    <h:selectBooleanCheckbox id="check" value="#{item.facility}"/>
    </h:column>
    <h:column>
    <h:outputLabel for="check">
    <h:outputText value="#{item.name}"/>
    </h:outputLabel>
    </h:column>
    </h:dataTable>

  • How to realign elements of an array? Working with old Dynamic Data consumers

    Hello,
    I've got some code which was written with DAQ assistants years ago.  I'm trying to use tasks and arrays for my producer now for speed and efficiency, but I'm stumped on one thing.
    The consumers were written to have the data in a certain order - there's even a VI in there that selects certain elements and sends them to specific outputs.  I previously took care of this with a simple VI that split the dynamic data, wired them to different order terminals, and then set it back to dynamic;  Screenshot attached.
    Is there a structure like this for array where you can break out all the array elements, reorder them and insert constants, and then put them back into the array?  What this ends up feeding is a subvi that's an array builder which converts the DD to array and then reroutes it.  Seems almost like what I'm trying to do could be done there, but it's a bit confusing to me.
    Thanks in advance.
    Still confused after 8 years.
    Attachments:
    realign.jpg ‏166 KB

    Hi Ralph@NES,
    One thing I have done before for this is create a mapping array and a for loop to reorder the elements in your data array. Take a look at the example VI I've attached. If you know exactly where you want everything, you just need to go into the mapping array and set the index destination for the corresponding data. Hope this helps.
    Paul C
    Paul C
    Applications Engineer
    National Instruments
    Attachments:
    Reorder Array.vi ‏9 KB

  • Mapping of Web App context root and the physical directory of the web app

    I'm running Weblogic 7.0 on Windows2000.The physical directory of my web application
    is D:\WL8\weblogic81\TestDeploy\build\TestWebApp and under these directory I have
    my JSPS, static HTML and WEB-INF. I define the context path of this web app in
    the weblogic.xml ;-
    <weblogic-web-app>
         <context-root>/testapp</context-root>
    </weblogic-web-app>
    As a result of deploying this web app in the server (or it may be created manually
    also), the following entry gets inserted in the server's config.xml ,-
    <Application Deployed="true" Name="TestWebApp"
    Path="D:\WL8\weblogic81\TestDeploy\build" TwoPhase="true">
    <WebAppComponent Name="TestWebApp" Targets="myserver" URI="TestWebApp"/>
    </Application>
    Now, whenever I make a request of the form "http://localhost:7001/testapp/..",
    it's properly executing my web app. My question is, how does the container knows
    that for any request for the web app with context path as 'testapp', it has to
    server files from D:\WL8\weblogic81\TestDeploy\build\TestWebApp. In the above
    process, nowhere such mapping is specified. I expected something like Tomcat's
    server.xml, where in docbase we clearly specify this mapping between the context
    path and the physical directory. Please help.

    Let me give some more details and hopefully this will make things clearer.
    Say you deploy /foo/bar/myweb.war and in myweb.war you configure a
    context-root of /rob
    During deployment, the server creates an ApplicationMBean with a path of
    /foo/bar/. It then creates a WebAppComponent with a uri of myweb.war.
    Next, deployment calls back on the web container and tells it to deploy
    the WebAppComponent. The web container reads the myweb.war, parses
    descriptors etc. The web container then updates its data structures to
    register that myweb.war has a context path of /rob. (It has to figure
    out all the other servlet mappings as well.)
    When a request for /rob/foo comes in, the web container consults its
    data structures to determine which webapp and servlet receives the
    request. This is not a linear search of all webapps and servlets.
    There's much better ways to do pattern matching.
    Hope this clears things up. Let me know if you still have questions.
    -- Rob
    Arindam Chandra wrote:
    Thanks for the answer. Still one thing is not clear. Whatever context path I declare
    for my web app as the value of <context-root> element in the weblogic.xml (in
    my example it's "/testapp"), it is no where mapped with the "URI" attribute (or
    any other attribute, sub-element whatsoever in the <Application> element).
    Application Deployed="true" Name="TestWebApp"
    Path="D:\WL8\weblogic81\TestDeploy\build" TwoPhase="true">
    <WebAppComponent Name="TestWebApp" Targets="myserver" URI="TestWebApp"/>
    </Application>
    So when a request of the form http://myweblogic.com:7001/testapp/... arrives at
    the server, how does the server knows that it has to serve this request with files
    from D:\WL8\weblogic81\TestDeploy\build\TestWebApp ? It should not be like the
    web container iterates thru all the web application entries in config.xml and
    tries to match with one context-root declaration. I repeat, I expected some mapping
    similar to Tomcat's server.xml, where in the <docbase> element u clearly specify
    the mapping between the context path and the physical directory
    Rob Woollen <[email protected]> wrote:
    Arindam Chandra wrote:
    I'm running Weblogic 7.0 on Windows2000.The physical directory of myweb application
    is D:\WL8\weblogic81\TestDeploy\build\TestWebApp and under these directoryI have
    my JSPS, static HTML and WEB-INF. I define the context path of thisweb app in
    the weblogic.xml ;-
    <weblogic-web-app>
         <context-root>/testapp</context-root>
    </weblogic-web-app>
    As a result of deploying this web app in the server (or it may be createdmanually
    also), the following entry gets inserted in the server's config.xml,-
    <>So the server will look for your web application at the Application Path
    (D:\WL8\weblogic81\TestDeploy\build|) + the web uri (TestWebApp). So
    it
    maps the context-root you've specified /testapp to that path.
    It's a little clearer in the case where you had a full-fledged EAR.
    Then you'r application path would map to the "root" of the EAR, and the
    uris would point to the various modules (eg webapps.)
    -- Rob
    Now, whenever I make a request of the form "http://localhost:7001/testapp/..",
    it's properly executing my web app. My question is, how does the containerknows
    that for any request for the web app with context path as 'testapp',it has to
    server files from D:\WL8\weblogic81\TestDeploy\build\TestWebApp. Inthe above
    process, nowhere such mapping is specified. I expected something likeTomcat's
    server.xml, where in docbase we clearly specify this mapping betweenthe context
    path and the physical directory. Please help.

  • Require some help making a random map.

    1) When you click on the "Generate" button a 15x21 board of Tile symbols is created, with top-left corner at (10,10). Initially all tiles should be blank.
    i need to somehow get that done.
    here is my code so far, i have a lot of graphics, movie clips and a button relating to the script, although right now they are not important.
    var ghosts:Array = new Array();
    var timers:Array = new Array();
    //======== ghosts and ghost behaviour =================//
    var ghostHoriz=1;
    for (var row = 0; row < 4; row++) {
              var g = new Ghost();
              var t:Timer=new Timer(400);
              g.timer=t;
              timers[row]=t;
              g.horiz=ghostHoriz;
              ghostHoriz*=-1;
              if (row==0||row==1) {
                        g.vert=1;
              else {
                        g.vert=-1;
              t.addEventListener(TimerEvent.TIMER, moveGhost);
              ghosts[row]=g;
              g.visible=false;
              addChild(g);
    var ghostIndex=0;
    function moveGhost(evt:TimerEvent) {
              var t=evt.currentTarget;
              var k=timers.indexOf(t);
              var g=ghosts[k] as Ghost;
              if (g.visible) {
                        var r=g.row;
                        var c=g.col;
                        with (g) {
                                  if (Math.random()<0.5) {
                                            if (((horiz > 0 && (c+horiz)<21)||(horiz < 0 && (c+horiz)>=0)) && (map[r][c+horiz]==0)) {
                                                      col+=horiz;
                                                      x+=horiz*20;
                                                      map[r][c+horiz]=2;
                                                      map[r][c]=0;
                                            else {
                                                      horiz*=-1;
                                  else {
                                            if ( (( vert > 0 && (r+vert)<15)||( vert < 0 &&(r+vert)>= 0)) && (map[r+vert][c]==0)) {
                                                      row+=vert;
                                                      y+=vert*20;
                                                      map[r+vert][c]=2;
                                                      map[r][c]=0;
                                            else {
                                                      vert*=-1;
    // ================= Button behaviour ========== //
    generate_btn.addEventListener(MouseEvent.CLICK, generate);
    function generate(m:MouseEvent = null) {
              initMap();
              ghostIndex=0;
    // other stuff
              displayMap();
    var map:Array = new Array();
    var tiles:Array = new Array();
    function initMap(){
    function displayMap() {
              for (var row = 0; row < 15; row++) {
                        for (var col = 0; col < 21; col++) {
                                  var test=map[row][col];
                                  tiles[row][col].x=10+col*20;
                                  tiles[row][col].y=10+row*20;
                                  switch (test) {
                                            case 2 :
                                                      g=ghosts[ghostIndex];
                                                      g.x=10+col*20;
                                                      g.y=10+row*20;
                                                      g.row=row;
                                                      g.col=col;
                                                      if (row==0) {
                                                                g.vert=1;
                                                      else {
                                                                g.vert=-1;
                                                      g.visible=true;
                                                      g.timer.start();
                                                      ghostIndex++;
                                                      break;
    bit long :/
    anyway when I basically need it so when you press generate it comes up with a random, how do i put this....it comes up with a random pacman sort of design. And everytime generate is clicked it changes, anyone know anything?
    also note, with the code up there, if I do click generate i get this error...
    Fonts should be embedded for any text that may be edited at runtime, other than text with the "Use Device Fonts" setting. Use the Text > Font Embedding command to embed fonts.
    TypeError: Error #1010: A term is undefined and has no properties.
              at Pacmanscripting_fla::MainTimeline/displayMap()
              at Pacmanscripting_fla::MainTimeline/generate()
    thanks in advance.

    erm i also have this. Its basically a list of the things that need to be accomplished in this task D:
    1) When you click on the "Generate" button a 15x21 board of Tile symbols is created, with top-left corner at (10,10). Initially all tiles should be blank.
    2) Extend the functionality behind the "Generate" button so that a random configuration of walls appears - 100 of the tiles should now be "filled". Each time you click on "Generate" there should be a different configuration. Hint: create a map array initially consisting of 0's. Generate should randomly produce 100 pairs of (row, column) values where you set the value in the map array to 1. Use the map array to display the board.
    3) Extend the "Generate" functionality even further. You should include in the application 4 instances of the Ghost symbol and one instance of the MyPac symbol. When you click on the "Generate" button, the ghosts should appear in each corner of the board, and the myPac should be in row 8, col 11 of the board. "Generate" should still produce a random configuration of 100 filled cells each time it is clicked, but the ghosts and myPac should always appear in the prescribed positions.
    4) Finally, you should animate the ghosts and add key-handling for the myPac symbol. The ghosts should "patrol" the board ie they can move randomly in the array but cannot go through "walls" or myPac. The starting fla includes some code you might find useful for this part of the assignment. myPac should move with arrow-key presses, but also cannot go through walls or ghosts
    if you are able to help me with steps 1-3 then thats enough. you dont need to do step 4 :3

  • Putting A Layer Over Drawing Canvas - Tile Map

    I want to make it so that a layer will be above the map when its drawn.
    Like I want a layer over this, cause im making a menu for the game, but the game is above the layer.
    var tiles:Object = new Object({width:52, height:26}); // The size of the 'flat' tile. Tiles are allowed to be different dimentions, to give the '3D' effect.
    var offset:Object = new Object({x:130, y:100}); // This object helps center the 'hero' to the stage.
    var hero:Object = new Object({x:1, y:5}); // The starting position of the 'hero'
    var canvas:Object = new Object({mc:_root.createEmptyMovieClip("canvas", _root.getNextHighestDepth())}); // Contains the primary movie clip and map information.
    canvas.map = new Array( // Dictates the topography of the environment
                            // The reason I decided to to use 200 for walls and 100 for ground is to leave
                            // the option open add more tiles, such as 86 for another type of tile that is
                            // walkable. Since the collision detection code checks to see if the tile is
                            // less then 200 (less is walkable, 200 or above is not), there is no need to change
                            // the code toenable new tiles, simply name them a number between 0 and 200.
                            new Array(200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,193,196,196,196,196,189,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,194,187,182,182,179,190,100,200),
                            new Array(200,100,100,199,199,199,199,199,199,199,199,199,199,186,183,183,180,190,100,200),
                            new Array(201,199,199,199,100,100,100,100,100,100,100,100,194,186,183,183,180,190,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,194,186,183,183,180,190,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,194,186,183,183,180,190,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,194,185,181,181,178,190,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,192,195,195,195,195,188,100,200),
                            new Array(200,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,200),
                            new Array(200,100,100,100,100,100,200,200,200,200,200,200,200,200,200,200,200,200,200,200),
                            new Array(200,200,200,200,200,200,200)
    _root.onLoad = function():Void
        initmap(canvas.map); // Draw the map
        initplayer(); // Draw the player
        return;
    _root.onEnterFrame = function():Void
        input(); // Handle keyboard movement
        return;
    function input():Void // Modifies the 'hero' object, handles collision detection ('hero' and wall)
        // Any tile less then 200 is walkable, anything above is not.
        // No need to change this code handle more tiles, just name the tiles a number.
        // (not the best way to do this but simple, quick, and easy to do)
        if(Key.isDown(Key.LEFT) && canvas.map[hero.y - 1][hero.x] < 200) hero.y--;
        else if(Key.isDown(Key.RIGHT) && canvas.map[hero.y + 1][hero.x] < 200) hero.y++;
        else if(Key.isDown(Key.UP) && canvas.map[hero.y][hero.x - 1] < 200) hero.x--;
        else if(Key.isDown(Key.DOWN) && canvas.map[hero.y][hero.x + 1] < 200) hero.x++;
        move();
        return;
    function move():Void // Moves the background and the hero
        // These three lines handle swapping the tile depths to give the '3D' effect
        var d:Number = (hero.y * tiles.height) + (hero.x * tiles.width) + hero.y;
        hero.mc.swapDepths(d);
        canvas.mc["tile_" + hero.y + "_" + hero.x].swapDepths(d - 1);
        // Move the hero in the opposite direction the environment moves
        hero.mc._x = (tiles.width / 2) * (hero.y - hero.x) + offset.x;
        hero.mc._y = (tiles.height / 2) * (hero.y + hero.x) + offset.y;
        // Move the environment
        canvas.mc._x = (tiles.width / 2) * (-hero.y - -hero.x) + offset.x;
        canvas.mc._y = (tiles.height / 2) * (-hero.y + -hero.x) + offset.y;
        return;
    function initplayer():Void // Self-expalanatory
        var d:Number = (hero.y * tiles.height) + (hero.x * tiles.width) + hero.y;
        hero.mc = canvas.mc.attachMovie("hero", "hero_mc", d + 1, {_x:hero.x * tiles.width, _y:hero.y * tiles.height});
        move();
        return;
    function initmap(map:Array):Void // Render map
        var map_height:Number = map.length; // Determine height of the map
        var map_width:Number = map[0].length; // Determine width of the map
        for(var y = 0; y < map_height; y++)
            for(var x = 0; x < map_width; x++)
                // Movieclip depth is everything when doing an isometric game
                var depth:Number = (y * tiles.height) + (x * tiles.width) + y;
                // Attach tile to 'canvas'
                var tile:MovieClip = canvas.mc.attachMovie("tile" + map[y][x], "tile_" + y + "_" + x, depth);
                tile._x = (tiles.width / 2) * (y - x) + offset.x;
                tile._y = (tiles.height / 2) * (y + x) + offset.y;
        return;

    there are no layers when your fla is published (or tested).  all displayobjects are assigned depths based on code used to assign depths and compiler code that assigns depths to objects you place on-stage in the authoring environment.
    all objects placed on-stage in the authoring environment are placed at negative depths starting with about -16,380.   that's why your menu (which is probably added to some layer in the authoring environment is below the movieclip you placed at nextHighestDepth() (which adds to no depth less than zero)
    to change a movieclip's depth use the swapDepths() method of movieclips.

  • How do I parse map data?

    The data i want to parse looks something like this:
    sdf,dfffffs,safsf,asasrw,re6546eg,dfgert;
    gfgr,trt546,rgert,egrg,erg,ergretgreg,erg;
    basically its items seperate with a , and they are ended with a ;
    i want to make a 2d array out of that.
    my pseudocode:
    new string array [amountoflines] [amountofitemsinfirstline]
    for i=0 to amountoflines do (i++)
    while j>0 do
      while k>0 do
       array[i][j] = array[i][j]+characterat(k);
       if( "," ) k=-1;
       if( ";" ) j = -1;
    }would it work? what kind of methods do you suggest i use?

    Did i get iit?
    // inputstr = the map data
    String inputstr= new String("Sad,asf,sdf,dst;ret,ert,yyt,ryt;ry,tr,yt,ry;");
    // Creates an array and assigns it like this:
    // Line 1 : Sad,asf,sdf,dst;  (does it also assign the ";" ?)
    // Line 2 : ret,ert,yyt,ryt;
    // Line 3 : ry,tr,yt,ry;
    String[] tmpstr=inputstr.split(";");
    // Defines the "Map" Array
    ArrayList _2DArray=new ArrayList();
    // Goes through Line 1-3 (mentioned above)
    // For each line it:
    // Splits the items along the "," and stores them in a 1Dimensilnall String Array
    // Ads/Insterts that array into the correct spot for the 2D array
    for(int i=0;i<tmpstr.length;i++)_2DArray.add(i,tmpstr.split(","));Does When it splits test,test1 with "," does it also return the , ?

  • Array interface for updates

    Hello I want to use array interface (iter parameter in OCIStmtExecute) in simple update statement:
    update A set column1 = 12 where column2 = :b
    the problem is that i cannot statically define array for my placeholder in OCIBindByPos, because b is a string (char*) and I don't know how many updates I will need.
    In this thread OCI in C - Is binding an array of character pointers possible?
    it is suggested to use a Piecewise Update.
    After reading it, it says that you need to call OCIStmtExecute multiply times, so I don't see how this minimises server roundtrips. Can anyone help me with this?
    Thanks

    If you use arrays , the server round trips are once per 2^32(65536) rows and not for each row.
    The pattern you have to use is as follows - which works for any data types.
    #define MAX_RECORD_INSERT 65535
    define the respective mapping arrays.
    OCIBind *bndHdl[100];
    int BindHdlCount =0,iterationCounter=0,bindCounter=0;
    long emp_no[MAX_RECORD_INSERT];
    char emp_name[MAX_RECORD_INSERT][256];
    create the SQL and do OCIHandleAlloc and OCIStmtPrepare
    start for loop ( For populating the array)
    ------------populate the arrarys here-----------------
    if (iterationCounter < MAX_RECORD_INSERT-1)
    {iterationCounter++;continue;}
    /*-------- Initialize INPUT Parameters --------*/
    for (BindHdlCount=0;BindHdlCount<TOTAL_ATTRIB_IN_SQL; BindHdlCount++)
    bndHdl[BindHdlCount] = 0;
    Us the respective OCIBindByPos here......
    OCIStmtExecute
    /*---------Check for Record Count---------------*/
    (void)OCIAttrGet((dvoid*)DBctx->stmthp,(ub4)OCI_HTYPE_STMT,
    (dvoid *)&p_sl_record_count, (ub4*)NULL,
    OCI_ATTR_ROW_COUNT, DBctx->errhp);
    if (p_sl_record_count != MAX_RECORD_INSERT)
    Error
    total_record_count+=iterationCounter;
    } // end of loop
    //Final Iteration- This is for partial round trips.
    if (iterationCounter>0)
    /*-------- Initialize INPUT Parameters --------*/
    for (BindHdlCount=0;BindHdlCount<TOTAL_ATTRIB_IN_SQL; BindHdlCount++)
    bndHdl[BindHdlCount] = 0;
    Us the respective OCIBindByPos here......
    OCIStmtExecute
    total_record_count+=iterationCounter
    total_record_count should match with total number of records in the arrary.
    THIS PATTERN WORKS well for 1024 Million records that I have tried.
    regards
    Prajith
    Message was edited by:
    prajithparan

  • Help making a reference array of objects?

    Problem
    I want to loop through an array of map tile coordinates, place a tile on the stage for each coordinate, and put a reference to each tile instance in a separate multidimensional array called mapRef, where the tile instances can later be referenced by their coordinates in mapRef.
    Is this line (excerpt from the code below)...
    Main.mapRef[i][j] = mapTile;
    ...the way to accomplish my goal?
    Or should I be writing it differently?
    Main.as
    package
        import flash.display.MovieClip;
        import Map;
        public class Main extends MovieClip
            public static var mapRef:Array = new Array;
            public function Main()
                var myMap:Map = new Map();
                addChild(myMap);   
    Map.as
    package
        import flash.display.MovieClip;
        public class Map extends MovieClip
            public function Map()
                var map:Array = [
                    [1,1,1,1,1,1,1,1],
                    [1,0,0,0,0,0,0,1],
                      [1,0,1,0,0,0,0,1],
                    [1,0,0,0,0,1,0,1],
                    [1,0,0,0,0,0,0,1],
                    [1,1,1,1,1,1,1,1]
                var tileW:uint = 50;
                var tileH:uint = 50;
                var mapWidth = map[0].length;
                var mapHeight = map.length;
                for (var i = 0; i < mapHeight; ++i) {
                    for (var j = 0; j < mapWidth; ++j) {
                        var mapTile:Tile = new Tile;
                        addChild(mapTile);
                        mapTile.x = (j*tileW);
                        mapTile.y = (i*tileH);
                        mapTile.gotoAndStop(map[i][j]+1);
                        Main.mapRef[i][j] = mapTile;

    var mapTileObj:Object={};
    for (var i = 0; i < mapHeight; ++i) {
                    for (var j = 0; j < mapWidth; ++j) {
                        var mapTile:Tile = new Tile();
                        addChild(mapTile);
                        mapTile.x = (j*tileW);
                        mapTile.y = (i*tileH);
                        mapTile.gotoAndStop(map[i][j]+1);
    mapTile.ivar=i;
    mapTile.jvar=j;
    mapTileObj[[i,j]]=mapTile;
    you can then retrieve the Tile instance at i,j by using:
    var mapTile:Tile = mapTileObj[[i,j]];
    and you can retrieve the i and j associated with any mapTile instance by using:
    var i:uint=mapTile.ivar;
    var j:uint=maptTile.jvar;

  • How to get title dyanamically in xsl

    Hi ,
    i am working seo project which is search engine optimigation.
    i have one xsl file and i added meta tag like
    <title> title</tile>
    <meta name="Description" content="MyDescription">
    <meta name="Keywords" content="Keyword1, Keyword2, �, KeywordN">
    can you please tell me how to get the dynamic title based on the url.
    and keyword with commas taking as input title.
    i am using javascript but i do not how to call that sciprt in xsl file
    this is my xsl file souce code
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:user="user" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xalan="http://xml.apache.org/xslt" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
    <xsl:param name="pageName"/>
    <xsl:param name="titlePage"/>
    <xsl:param name="keyword"/>
    <!-- start - includes -->
    <xsl:include href="../mobility/header.xsl"/>
    <xsl:include href="../mobility/footer.xsl"/>
    <xsl:include href="../mobility/navigation.xsl"/>
    <xsl:include href="../mobility/mobility_content.xsl"/>     
    <!-- end - includes -->
    <xsl:template match="page">
    <html>
    <head>
    <script type="text/javascript">
              function test2()
              var st= "nissan uk";
              str = str.toLowerCase();
    str = str.replace(/['"-]/g, ",");
    str = str.replace(/\W/g, ",");
              str = str.replace(/\s+/g, ",");
    window.location();
    </script>
    <title><xsl:value-of select="$titlePage"/></title>
    <xsl:variable name="keywords" select="'keyword'"/>
    <xsl:variable name="scriptid" select="test2()"/>
    <meta content="We have developed this site to make it easier to access the information you need, when you need it. " name="Description" />
    <meta content="{$scriptid}" name="Keywords"/>
    <meta content="index, follow" name="Robots"/>
    <xsl:comment><xsl:value-of select="$titlePage"/>.We have developed this site to make it easier to access the information you need, when you need it. </xsl:comment>
         <link rel="stylesheet" type="text/css" href="/nova/global/css/mobility/mobility.css"/>
         <script type="text/javascript" src="/nova/global/js/mobility/ExpandingMenu.js"/>
         <script type="text/javascript" src="/nova/global/js/mobility/Popup.js"/>
         <script type="text/javascript" src="/nova/global/js/global.js"/>
    </head>
    <body id="mb_bodyMargin" >
         <!-- start - to publish the header details -->
         <div id="mb_navtop">
         <xsl:call-template name="header"/>
         </div>
         <!-- end - to publish the header details -->
         <div id="mb_navMenu">
         <div class="mb_leftContent">
         <!-- start - to publish the left navigation -->
              <div class="mb_menublock">
              <div class="mb_menublockGrayPatch"></div>           
              <xsl:copy-of select="/page/navigation/node()"/>               
              </div>
              <!-- end - to publish the left navigation -->     
              <div class="mb_whitePathch"></div>               
              <!-- start - to publish the Motability image & Related Pags -->
              <div class="mb_mobilityimage">
              <a>
                   <xsl:attribute name="href"><xsl:value-of select="collection/image/IMAGE-LINK"/></xsl:attribute>
                   <img>
                   <xsl:attribute name="src">/nova/<xsl:value-of select="collection/image/filename"/></xsl:attribute>
                   <xsl:attribute name="alt"><xsl:value-of select="collection/image/alt"/></xsl:attribute>
                   <xsl:attribute name="border">0</xsl:attribute>                    
                   <xsl:attribute name="class">mb_imgMotability</xsl:attribute>                    
                   </img>                         
                   </a>
              <xsl:apply-templates select="collection" mode="mb_related_links"/>
              </div>
              <!-- end - to publish the Motability image & Related Pags -->
         </div>
         <!-- start - to publish the right content & footer details -->               
         <div class="mb_rightContent">
              <xsl:apply-templates select="collection" mode="mobility_home"/>
              <xsl:call-template name="footer"/>
         </div>
         <!-- end - to publish the right content & footer details -->
         </div>
    </body>
    <!-- start - to expand and highlight the selected menu/sub-menu item -->
    <xsl:variable name="pageNameWithoutIndex" select="$pageName"/>
    <xsl:choose>
    <xsl:when test="contains($pageNameWithoutIndex,'/')">
         <xsl:variable name="firstNav" select="substring-before($pageNameWithoutIndex,'/')"/>
         <xsl:variable name="secondNav" select="substring-after($pageNameWithoutIndex,'/')"/>
         <script>
              expand('<xsl:value-of select="$firstNav"/>','<xsl:value-of select="$pageNameWithoutIndex"/>');
         </script>     
    </xsl:when>
    <xsl:otherwise>
         <xsl:variable name="firstNav" select="$pageNameWithoutIndex"/>
         <script>
              expand('<xsl:value-of select="$firstNav"/>');
         </script>     
    </xsl:otherwise>
    </xsl:choose>
    <!-- start - to expand and highlight the selected menu/sub-menu item -->
    </html>
    </xsl:template>
    </xsl:stylesheet>
    and sitemap.map file is
    <?xml version="1.0"?>
    <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
    <!-- Reorganised sitemap as follows:- printing pipeline, then main pipeline-->
    <!--============================ Views ======================================-->
         <map:views>
              <map:view from-label="beautify" name="beautify">
                   <map:transform type="i18n">
                        <map:parameter name="locale" value="{../locale}"/>
                   </map:transform>
                   <map:serialize type="xml"/>
              </map:view>
         </map:views>
    <!--=========================== Pipelines =================================-->
    <map:pipelines>
         <map:pipeline>
    <!--============= to generate Content for navigation ===============================-->
         <map:match pattern="navigation.xml">
         <map:generate src="cocoon:/navigation_gen.xml"/>
         <map:transform src="context:///stylesheets/mobility/navigation.xsl"/>
    <map:serialize type="xml"/>
         </map:match>
    <!--============= to generate Channel information for Mobility =================-->
         <map:act type="nscData">
              <map:match pattern="navigation_gen.xml">
              <map:generate src="cocoon://sitemap-gen_{../locale-path}.xml" />
              <map:transform src="context:///stylesheets/mobility/channel.xsl"/>
         <map:serialize type="xml"/>
              </map:match>
         </map:act>
         <map:act type="nscData">
    <!--============ NOVA - Mobility root pipeline ====================-->
              <map:match pattern="">
                   <map:redirect-to uri="mobility/index.html"/>
              </map:match>
              <map:match pattern="home/index.*">
                   <map:redirect-to uri="/home/mobility/index.html"/>
              </map:match>
    <!--================================= Nissan mobility Home Page =================================-->
                   <map:match pattern="index.*">
                   <map:aggregate element="page" label="beautify">
                             <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
                             <map:part src="cocoon://{../locale-path}/mobility/home.chan"/>
              </map:aggregate>
              <map:call resource="get_{1}">
                             <map:parameter name="filename" value="home"/>
                             <map:parameter name="titlefilename" value="nissan uk,home"/>
                             <map:parameter name="keywordname" value="nissan,uk,home"/>
                        </map:call>
              </map:match>
              <!--=================================== Scheme page =======================================-->
              <map:match pattern="scheme/index.*">
                        <map:aggregate element="page" label="beautify">
                   <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
                             <map:part src="cocoon://{../locale-path}/mobility/scheme.chan"/>
              </map:aggregate>
                        <map:call resource="get_{1}">
                             <map:parameter name="filename" value="scheme" />
                             <map:parameter name="titlefilename" value="nissan uk,scheme"/>
                             <map:parameter name="keywordname" value="nissan,uk,scheme"/>
                        </map:call>
              </map:match>
              <!--====================== For the Scheme sub-menu pages =========================-->
              <map:match pattern="scheme/*/index.*">
                        <map:aggregate element="page" label="beautify">
                   <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
                             <map:part src="cocoon://{../locale-path}/mobility/scheme/{1}.chan"/>
              </map:aggregate>
                        <map:call resource="get_{2}">
                             <map:parameter name="filename" value="{1}" />
                             <map:parameter name="file-path" value="scheme/{1}"/>
                             <map:parameter name="file-path1" value="Nissan UK,scheme-{1}"/>
                             <map:parameter name="keywordname" value="nissan,uk,scheme,{1}"/>
                        </map:call>
              </map:match>
              <!--====================== For those pages under construction =============-->
              <map:match pattern="mobility_centre/index.*">
                        <map:aggregate element="page" label="beautify">
                   <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
                             <map:part src="cocoon://{../locale-path}/mobility/mobility_centre.chan"/>
              </map:aggregate>
                        <map:call resource="get_{1}">
                             <map:parameter name="filename" value="mobility_centre" />
                             <map:parameter name="titlefilename" value="Nissan UK,mobility_centre" />
                        </map:call>
              </map:match>
              <!--====================== For the sub-menu pages under construction=========================-->
              <map:match pattern="mobility_centre/*/index.*">
                        <map:aggregate element="page" label="beautify">
                   <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
                             <map:part src="cocoon://{../locale-path}/mobility/mobility_centre.chan"/>
              </map:aggregate>
                        <map:call resource="get_{2}">
                             <map:parameter name="filename" value="{1}" />
                             <map:parameter name="file-path" value="mobility_centre/{1}"/>
                        </map:call>
              </map:match>
    <!--================================== Vehicles page =======================================-->
    <map:match pattern="vehicles/index.*">
    <map:aggregate element="page" label="beautify">
    <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
    <map:part src="cocoon://{../locale-path}/mobility/vehicles.chan"/>
    <map:part element="passenger" src="cocoon://{../locale-path}/mobility/vehicles/passenger.chan"/>
    <map:part element="lcv" src="cocoon://{../locale-path}/mobility/vehicles/lcv.chan"/>
    <map:part element="four-by-four" src="cocoon://{../locale-path}/mobility/vehicles/4x4.chan"/>
    </map:aggregate>
    <map:call resource="get_{1}">
    <map:parameter name="filename" value="vehicles" />
    <map:parameter name="titlefilename" value="nissan uk,vehicles"/>
    </map:call>
    </map:match>
    <!--=============================== For Vehicles sub-menu pages =============================-->
    <map:match pattern="vehicles/*/*/index.*">
    <map:aggregate element="page" label="beautify">
    <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
    <map:part src="cocoon://{../locale-path}/mobility/vehicles.chan"/>
    <map:part src="cocoon://{../locale-path}/mobility/vehicles/{1}/{2}.chan"/>
    <map:part element="" strip-root="false" src="cocoon://{../locale-path}/mobility/vehicles/{1}/{2}/NSC-MODEL-XTND.type"/>
    <map:part src="cocoon://{../locale-path}/vehicles/{1}/{2}/grades-and-specs/EQUIPMENT-XTND.type"/>
    <map:part src="cocoon://{../locale-path}/vehicles/{1}/{2}/grades-and-specs/GRADE-XTND.type"/>
    <map:part src="cocoon://{../locale-path}/vehicles/{1}/{2}/carbuilder/ENGINE-AND-TRANS-XTND.type"/>
    <map:part element="BODY" src="cocoon://{../locale-path}/vehicles/{1}/{2}/carbuilder/BODY-XTND.type"/>
    <map:part element="" strip-root="true" src="cocoon://logicsheets/vehicles/pv-gp.xsp?country={../country}&locale={../locale-path}&with-vat={../with-vat}&modelGroup={2}&cache-timeout=600" />
    </map:aggregate>
    <map:call resource="get_{3}">
    <map:parameter name="filename" value="vehicles-details" />
    <map:parameter name="file-path" value="vehicles/{1}/{2}"/>
    <map:parameter name="tiltefile-path" value="nissan uk, vehicles -{1}-{2}"/>
    <map:parameter name="tiltefile-path-intro" value="nissan uk, vehicles -{1}-{2}-intro"/>
    </map:call>
    </map:match>
    <!--======================== Performance/Energy (Frugality page) ==============================-->
    <map:match pattern="*/*/*/performance/energy/index.*">
    <map:aggregate element="page">
    <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
    <map:part src="cocoon://{../locale-path}/mobility/vehicles/image.type"/>
    <map:part src="cocoon://{../locale-path}/mobility/vehicles/Mb_Relatedlinks.type"/>
    <map:part src="cocoon://{../locale-path}/mobility/vehicles/{2}/{3}.chan"/>
    <map:part src="cocoon://logicsheets/vehicles/engine-energy.xsp?locale={../locale-path}&model-code={3}&cache-timeout=600" />
    <map:part src="cocoon://logicsheets/vehicles/model-body-engine-attributes.xsp?model-code={3}&cache-timeout=600"/>
    </map:aggregate>
    <map:call resource="get_{4}">
    <map:parameter name="filename" value="energy" />
    <map:parameter name="file-path" value="vehicles/{2}/{3}"/>
    </map:call>
    </map:match>
    <!--======================== Price popup for Vehicle pages ==============================-->
    <map:match pattern="*/*/*/price-popup.*">
    <map:aggregate element="page">
    <map:part src="cocoon://{../locale-path}/mobility/vehicles/{2}/{3}.chan"/>
    </map:aggregate>
    <map:call resource="get_{4}">
    <map:parameter name="filename" value="price-popup" />
    <map:parameter name="file-path" value="vehicles/{3}"/>
    </map:call>
    </map:match>
              <!--====================== News and Events page ==========================-->
              <map:match pattern="news-events/index.*">
                        <map:aggregate element="page" label="beautify">
                             <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
                             <map:part src="cocoon://{../locale-path}/mobility/news-events.chan"/>
              </map:aggregate>
                        <map:call resource="get_{1}">
                             <map:parameter name="filename" value="news-events" />
                        </map:call>
              </map:match>
              <!--======================= News Article page ============================-->
    <map:match pattern="news-events/*.*">
    <map:aggregate element="page" label="beautify">
    <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
    <map:part src="cocoon://{../locale-path}/mobility/news-events.chan"/>
    <map:part src="cocoon://{../locale-path}/{1}.item"/>
    </map:aggregate>
    <map:call resource="get_{2}">
    <map:parameter name="filename" value="news-article"/>
    </map:call>
    </map:match>
              <!--=================== contact us / Requests page =======================-->
              <map:match pattern="contactus/index.*">
                        <map:aggregate element="page" label="beautify">
                             <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
                             <map:part src="cocoon://{../locale-path}/mobility/contactus.chan"/>
              </map:aggregate>
                        <map:call resource="get_{1}">
                             <map:parameter name="filename" value="contactus" />
                        </map:call>
              </map:match>
              <!-- ================ Brochure and Test Drive page =========================== -->
              <map:match pattern="*/brochure_testdrive/index.*">
                   <map:act type="sessionCreator"> <!-- sessionCreator -->     
                        <map:aggregate element="page" label="beautify">
                             <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
    <map:part src="cocoon://{../../locale-path}/mobility/contactus/image.type"/>
    <map:part src="cocoon://{../../locale-path}/mobility/contactus/Mb_Relatedlinks.type"/>
    <map:part src="cocoon://request.params"/>          
                             <map:part src="cocoon://session.params"/>
    <map:part src="cocoon://vehicles/leads_vehicle_data.xml"/>
         <map:part element="brochure" strip-root="true" src="cocoon://{../../locale-path}/mobility/contactus/brochure_testdrive.chan"/>
                             <map:part element="testdrive" strip-root="true" src="cocoon://{../../locale-path}/mobility/contactus/testdrive.chan"/>
                             <map:part element="" strip-root="true" src="../content/contact/{../../locale-path}/brochure/step1-static.xml"/>
              </map:aggregate>
                        <map:call resource="get_{../2}">
                             <map:parameter name="filename" value="brochure-testdrive" />
                             <map:parameter name="file-path" value="{../1}/brochure_testdrive" />
                             <map:parameter name="file-path" value="nissan uk,passanger-range " />
                        </map:call>
                   </map:act>     
              </map:match>
              <!-- ===================== Enquiries page ================================ -->
              <map:match pattern="*/enquiries/index.*">
                   <map:act type="sessionCreator"> <!-- sessionCreator -->     
                        <map:aggregate element="page" label="beautify">
                             <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
                             <map:part src="cocoon://{../../locale-path}/mobility/contactus/image.type"/>
    <map:part src="cocoon://{../../locale-path}/mobility/contactus/Mb_Relatedlinks.type"/>
                             <map:part src="cocoon://{../../locale-path}/mobility/contactus/enquiries.chan"/>
                             <map:part element="" strip-root="true" src="../content/contact/{../../locale-path}/mobility/mobility.xml"/>
              </map:aggregate>
                        <map:call resource="get_{../2}">
                             <map:parameter name="filename" value="enquiries" />
                             <map:parameter name="file-path" value="{../1}/enquiries" />
                        </map:call>
                   </map:act>     
              </map:match>
              <!-- ========================= Your Details page ============================ -->
    <map:match pattern="*/*/yourdetails.*/*">
         <map:act type="sessionWriter">
    <map:aggregate element="page" label="beautify">
    <map:part src="cocoon://request.params"/>
    <map:part src="cocoon://session.params"/>
    <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
    <map:part src="cocoon://{../../locale-path}/mobility/contactus/image.type"/>
              <map:part src="cocoon://{../../locale-path}/mobility/contactus/Mb_Relatedlinks.type"/>
    <map:part element="" strip-root="true" src="../content/contact/{../../locale-path}/mobility/step1-static.xml"/>
    <map:part element="" strip-root="false" src="../content/contact/{../../locale-path}/mobility/occupation.xml"/>
    </map:aggregate>
    <map:call resource="get_{../3}">
    <map:parameter name="filename" value="yourdetails" />
    <map:parameter name="file-path" value="{../1}/{../2}"/>
    <map:parameter name="formValues" value="{../4}"/>
    </map:call>
    </map:act>
    </map:match>
         <!--========================= No Postal Address code Page =========================-->
         <map:match pattern="*/*/postcode.*/*">
                        <map:act type="sessionWriter">     
                             <map:aggregate element="page" >
                                  <map:part src="cocoon://request.params"/>          
                             <map:part src="cocoon://session.params"/>     
                             <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
         <map:part src="cocoon://{../../locale-path}/mobility/contactus/image.type"/>
         <map:part src="cocoon://{../../locale-path}/mobility/contactus/Mb_Relatedlinks.type"/>
                             <map:part strip-root="true" src="cocoon://contact/common_{../../locale-path}.xml?section-header-id=/{../../locale-path}/contact/brochure"/>                          
                                  <map:part element="" strip-root="true" src="../content/contact/{../../locale-path}/mobility/step1-static.xml"/>
                                  <map:part element="" strip-root="false" src="../content/contact/{../../locale-path}/common/occupation.xml"/>                              
                                  <map:part element="" strip-root="false" src="cocoon://search.qas"/>
                                  <map:part strip-root="true" src="cocoon://{../../locale-path}/contact.chan"/>
                                  <map:part strip-root="true" src="cocoon://{../../locale-path}/contact/brochure.chan_errcheck"/>
                             </map:aggregate>
                             <map:call resource="get_{../3}">
                                  <map:parameter name="filename" value="yourdetails" />
                                  <map:parameter name="file-path" value="{../1}/{../2}"/>
                                  <map:parameter name="formValues" value="{../4}"/>
                             </map:call>
                        </map:act>     
                   </map:match>
                   <map:match pattern="*/list.*">
                        <map:act type="sessionWriter">
                             <map:aggregate element="page">
                                  <map:part src="cocoon://request.params"/>          
                             <map:part src="cocoon://session.params"/>
                                  <map:part strip-root="true" src="cocoon://contact/common_{../../locale-path}.xml?section-header-id=/{../../locale-path}/contact/{../1}"/>      
                                  <map:part element="" strip-root="true" src="../content/contact/{../../locale-path}/address/list-static.xml"/>
                             <map:part src="cocoon://results.qas"/>          
                             </map:aggregate>                         
                             <map:call resource="get_{../2}">
                                  <map:parameter name="file-path" value="/{nsc-short-name}/{locale-path}/site-media/contact/"/>                         
                                  <map:parameter name="filename" value="address/list" />
                                  <map:parameter name="nedstat-path" value="{../../country-upper}.{../1}.askaddress"/>                              
                             </map:call>
                        </map:act>
                   </map:match>     
                   <map:match pattern="*/validate.*">
                        <map:act type="sessionWriter">
                             <map:aggregate element="page" >
                                  <map:part src="cocoon://request.params"/>          
                             <map:part src="cocoon://session.params"/>
                                       <map:part strip-root="true" src="cocoon://contact/common_{../../locale-path}.xml?section-header-id=/{../../locale-path}/contact/{../1}"/>      
                                  <map:part element="" strip-root="true" src="../content/contact/{../../locale-path}/address/validate-static.xml"/>
                             <map:part src="cocoon://results.qas"/>          
                             </map:aggregate>
                             <map:call resource="get_{../2}">
                                  <map:parameter name="file-path" value="/{nsc-short-name}/{locale-path}/site-media/contact/"/>                         
                                  <map:parameter name="filename" value="address/validate" />
                                  <map:parameter name="nedstat-path" value="{../../country-upper}.{../1}.askaddress"/>                              
                             </map:call>
                        </map:act>
                   </map:match>
              <map:match pattern="*/*/confirmation.*">
                             <map:act type="sessionWriter">
                             <map:act type="data-submit">     
                                  <map:aggregate element="page" >
                                       <map:part src="cocoon://request.params"/>          
                                  <map:part src="cocoon://session.params"/>
                                  <map:part src="cocoon://vehicles/leads_vehicle_data.xml"/>     
                                  <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
    <map:part src="cocoon://{../../../locale-path}/mobility/contactus/image.type"/>
                                  </map:aggregate>
                                  <map:call resource="get_{../../3}">
                                       <map:parameter name="filename" value="confirmation"/>
                                       <map:parameter name="file-path" value="{../../1}/{../../2}"/>
                                  </map:call>
                             </map:act>
                        </map:act>
                   </map:match>
         <!--============================ Tell us More Page ================================-->
    <map:match pattern="*/*/more.*">
                        <map:act type="sessionCreator">                    
                             <map:aggregate element="page" >
                                  <map:part src="cocoon://request.params"/>          
                             <map:part src="cocoon://session.params"/>
                             <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
              <map:part src="cocoon://{../../locale-path}/mobility/contactus/image.type"/>
    <map:part src="cocoon://{../../locale-path}/mobility/contactus/Mb_Relatedlinks.type"/>
                                  <map:part strip-root="true" src="cocoon://contact/common_{../../locale-path}.xml?section-header-id=/{../../locale-path}/contact/{../1}"/>     
                                  <map:part element="" strip-root="true" src="../content/contact/{../../locale-path}/common/more-static.xml"/>
                                  <map:part strip-root="true" src="cocoon://{../../locale-path}/contact.chan_errcheck"/>
                                  <map:part strip-root="false" src="../content/contact/received-files/Leisure_{../../locale-path}.xml"/>
                                  <map:part strip-root="false" src="../content/contact/received-files/Sport_{../../locale-path}.xml"/>
                                  <map:part strip-root="false" src="../content/contact/received-files/FinanceType_{../../locale-path}.xml"/>
                                  <map:part strip-root="false" src="../content/contact/received-files/FuelType_{../../locale-path}.xml"/>
                             </map:aggregate>
                             <map:call resource="get_{../3}">
                                  <map:parameter name="filename" value="more" />
                                  <map:parameter name="file-path" value="/{nsc-short-name}/{locale-path}/site-media/contact/"/>                              
                                  <map:parameter name="nedstat-path" value="{../../country-upper}.contact.{2}.more"/>
                             </map:call>
                        </map:act>
                   </map:match>
         <!--============================ confirmation2 ================================-->
    <map:match pattern="*/*/confirm_more.*">
    <map:act type="sessionWriter">
    <map:act type="data-submit">
    <map:aggregate element="page" >
    <map:part src="cocoon://request.params"/>
    <map:part src="cocoon://session.params"/>
    <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
                   <map:part src="cocoon://{../../../locale-path}/mobility/contactus/image.type"/>
    <map:part strip-root="true" src="cocoon://contact/common_{../../../locale-path}.xml?section-header-id=/{../../../locale-path}/contact/{../../1}"/>
    <map:part element="" strip-root="true" src="../content/contact/{../../../locale-path}/common/confirmation-static.xml"/>
    </map:aggregate>
    <map:call resource="get_{../../3}">
    <map:parameter name="filename" value="confirmation_more" />
    <map:parameter name="file-path" value="{../../1}/{../../2}"/>
    </map:call>
    </map:act>
    </map:act>
    </map:match>
    <!--============================ Sitemap page ================================-->
              <map:match pattern="sitemap/index.*">
                        <map:aggregate element="page" label="beautify">
                             <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
                             <map:part src="cocoon:/navigation_gen.xml"/>
                             <map:part src="cocoon://{../locale-path}/mobility/sitemap.chan"/>
              </map:aggregate>
                        <map:call resource="get_{1}">
                             <map:parameter name="filename" value="sitemap"/>
                        </map:call>
         </map:match>
         <!-- =========================== Image PopUp ================================= -->
    <map:match pattern="*/image-popup.*">
         <map:aggregate element="page" label="beautify">
                        <map:part src="cocoon://{../locale-path}/mobility/scheme.chan"/>
                   </map:aggregate>
    <map:call resource="get_{2}">
                        <map:parameter name="filename" value="image-popup"/>
              </map:call>
         </map:match>
    <!-- ======================== Editorial - PopUp ================================== -->
    <map:match pattern="scheme/editorial-popup.*">
              <map:aggregate element="page" label="beautify">
                   <map:part src="cocoon://{../locale-path}/mobility/scheme/editorial-page-standard.type"/>
                   </map:aggregate>
    <map:call resource="get_{1}">
                   <map:parameter name="filename" value="editorial-popup"/>
              </map:call>
         </map:match>
    <!--=========================== Terms and Conditions =================================-->
    <map:match pattern="terms-conditions/index.*">
    <map:aggregate element="page" label="beautify">
    <map:part element="" strip-root="true" src="cocoon:/navigation.xml"/>
    <map:part src="cocoon://{../locale-path}/mobility/home/editorial-page-faq-short.type"/>
    <map:part src="cocoon://{../locale-path}/mobility/home/image.type"/>
    </map:aggregate>
    <map:call resource="get_{1}">
    <map:parameter name="filename" value="terms-conditions"/>
    </map:call>
    </map:match>
         </map:act>
         </map:pipeline>
    </map:pipelines>
    <!--=========================== Resources =================================-->
         <map:resources>
              <map:resource name="get_html">
                   <map:act type="nscData">     
                   <map:transform type="i18n">
                             <map:parameter name="locale" value="{../locale}" />
                        </map:transform>               
                        <map:transform type="xslt" src="cocoon://stylesheets/mobility/{../filename}.xsl">
                             <map:parameter name="pageName" value="{../filename}"/>
                             <map:parameter name="titlePage" value="{../titlefilename}"/>
                             <map:parameter name="keyword" value="{../keywordname                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Works for me. What happened when you tried?
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #E6E6EE;
    overflow: auto;"
    title="this text can be pasted into the AppleScript Editor">
    tell application "Finder" to display dialog "I need ® or ™ in dialog box text" with title "I need ® or ™ in dialog box text" buttons {"Aha!"} default button 1</pre>

Maybe you are looking for

  • Reading Values from a Hashtable.Please guideu

    Chaps, I am in a strange situation I am having a hashtable with the flwg values Entertainment Games Entertainment Video PIM Calculator Entertainment Jump Settings Set Entertainment Poker Now,I need to search this hashtable for the Object 'Entertainme

  • Storing iTunes on external hard drive -- quick question

    I know how to save my iTunes library on an external hard drive, but how do I move my entire Itunes onto it? Do I just save the Itunes on the external drive instead of on the C drive? As it is now, all my music is stored on the external drive, but if

  • How do I mark spam and keep it unread?

    When I select a new email in my Inbox and mark it as spam it is moved to the Spam Detector folder but it is now considered read. Is there a way to mark it as spam without it being considered read? Thank you.

  • Employee schedule

    Hey Guys, I wonder if anyone have had any experience with this situation. its more of an SQL question but I can not find any answer to it anywhere and hoping someone here can help. I need to create an employee shedule for dispaching techs to do jobs

  • Non-ASCII content in body

    Hi When I send non-ASCII content in the body of a mail, the content does not appear correctly in the mail body. <BR> THe ccode is as below msg.setHeader("Content-Transfer-Encoding", "quoted-printable" ); <BR> String a = MimeUtility.encodeText("�later