Position of a node in an XSLT page

Hi ,
I am using an xslt page which tells the occurance of a node and am checking if the node is the first or the last node
for the last occurance i am aware that it should be
position() != last
how do we check for the first position ???
Thanks.

Hi ,
I am using an xslt page which tells the occurance of
a node and am checking if the node is the first or
the last node
for the last occurance i am aware that it should be
position() != last
how do we check for the first position ???
Thanks.maybe
position() != 1???

Similar Messages

  • Updating template based XSLT page

    I have the following setup: a template and a few HTML pages
    based on it plus a few XSLT(.xsl) pages based on that template.
    Whenever I change the template, the HTML pages are automatically
    updated, but not the XSLT ones, even tough they appear in the list
    from the "update pages" dialog. If I load the XSLT page and choose
    from the menu Modify>Templates>Update Current Page, the page
    gets updated. If I choose Modify>Templates>Update Pages, it
    doesn't work.
    This is happening only in Dreamweaver CS4, it was working in
    CS3.
    Recreating site cache doesn't solve the problem.
    Is there any option to enable so that all the pages based on
    a template (not only the HTML ones gets updated?
    Thanks,
    Adrian.

    Mat:
    Here's my stock answer for this question -
    Here are seven common mistakes that will result in changes not propagating from Template to child -
    1.  Rename the Templates folder
    2.  Move the Templates folder to some other folder level in the site other than root level
    3.  Move a template out of the Templates folder.
    4.  Make changes to an editable region of the Template (which will not propagate)
    5.  Assume that Template changes will be effected by just uploading the changed Template file to the server without also uploading the changed local files
    6.  Corrupt the site cache so that the link between Template and child page is broken
    7.  Improperly create your child pages by simply opening the Template, adding page specific content, and resaving the Template with an *.html extension rather thanits *.dwt extension. (you can tell if this is the case by looking at the code on a child page - if you see anything like <!-- TemplateBeginEditable... then this is what you have done).  If you *have done this*, then recreate the child pages (in DW) using FILE | New > Page from Template, select the Template and click CREATE.
    The 6th problem can be repaired by using SITE | Advanced > Recreate Site Cache, and the six others can be fixed by just not doing them.  Have you done any of those?
    Or, read this -
    http://www.adobe.com/go/dd83ba8b

  • Get Node Value in XSLT

    Hi all.
    Maybe a simple question but, I haven't done yet.
    In BPEL, when I need to get a node, I use getVariableData XPath function, for example:
    count(bpws:getVariableData('MtlSystemItemsBESB_OutputVariable','MtlSystemItemsBCollection','/ns7:MtlSystemItemsBCollection/ns7:MtlSystemItemsB')) to get the number of lines returned from the service call.
    Now, when I use XSLT transformation in ESB, I don't have a variable to extract the value from. So, how do I use XPath expressions that involve node-set return values?
    I tried something like count('/ns7:MtlSystemItemsBCollection/ns7:MtlSystemItemsB') but it does not seem to work.
    Thanks
    Denis

    Hi Denis,
    count('/ns7:MtlSystemItemsBCollection/ns7:MtlSystemItemsB') should work as expected. Have you double checked your XPath (namespace, elementnames, etc.)?

  • Node checking in xslt mapping

    Hi All,
    I have a requirement in xslt mapping (java)where i need to find the existence of a node , if it is existed the node should be created with the value on target side , if it is not existed the empty node should be created in the target.
    Thanks in Advance
    Prasad

    Hello,
    You can use the "<b>choose</b>" test:
    <u>Here an example:</u>
    <xsl:choose>
      <xsl:when test="InvoiceType/InvoiceTypeCoded = 'DebitMemo'">
        <InvoiceType stdValue="380"/>
      </xsl:when>
      <xsl:when test="InvoiceType/InvoiceTypeCoded = 'CreditMemo'">
        <InvoiceType stdValue="381"/>
      </xsl:when>
    </xsl:choose>
    If you have only one test without an else you can use the "<b>if</b>" test:
    <u>Here an example:</u>
    <xsl:if test="InvoiceIssueDate != 'N/A'">
      <InvoiceDate/>
    </xsl:if>
    You can find more detailed on this site:
    http://www.zvon.org/xxl/XSLTreference/Output/index.html
    Regards,
    Chris

  • XSLT page refresh issue on updating xml

    hi,
    my application involves rendering of xml through XSLT on ah HTML page.
    i am using XMLTransformer in servlet i.e.
    transformer.transform( new StreamSource(tempXmlFile),
    new StreamResult(outputHtmlFile));
    response.sendRedirect(request.getContextPath() + "/logDetailXsl.html");
    and then i redirect the servlet to html page where html page is built through xslt therefore no meta tags or scriplets can be made.
    problem is that html page is not updated. i have used javascript for refresh but it doesnot work either.
    i m new using xslt so can not identify if the problem is with xslt or html page!
    pointers appreciated!

    hi,
    my application involves rendering of xml through XSLT on ah HTML page.
    i am using XMLTransformer in servlet i.e.
    transformer.transform( new StreamSource(tempXmlFile),
    new StreamResult(outputHtmlFile));
    response.sendRedirect(request.getContextPath() + "/logDetailXsl.html");
    and then i redirect the servlet to html page where html page is built through xslt therefore no meta tags or scriplets can be made.
    problem is that html page is not updated. i have used javascript for refresh but it doesnot work either.
    i m new using xslt so can not identify if the problem is with xslt or html page!
    pointers appreciated!

  • How to get the presentation node name at the page title?

    Hi,
    I am setting the title of any page dynamically at the framework/portal.jsp. In
    order to do this, I am doing:
    PageState pageState = PortalRenderHelper.getPageState(request);
    String pageName = pageState.getDisplayName();
    and displaying the page name in the title.
    Now, in order to have automated tests work correctly, I have to give a unique
    name to all the different presentation nodes. Thus, the title should be something
    like pageName:nodeName. How can I do that? Any suggestions?
    Thanks in advance.

    I think it possible to access that data through embedded java or by creating some custom java function.
    If you put this under Java Embedded activity you will recieve the name of the previous activity at runtime.
    try {     
    IInstanceHandle instance = getLocator().lookupInstanceByConversationId(getConversationId());
    IActivityHandle[] activities = instance.listActivities();
    addAuditTrailEntry(activities[ activities.length - 1 ].getLabel());
    } catch ( Exception e ) {    
    addAuditTrailEntry(e.getMessage());
    Note: In some situations lookupInstanceByConversationId doesnt work becouse [ i think ] the process is not yet in the db.
    Message was edited by:
    Bogumil Laska

  • How do I listen for change in the global position of a Node

    Hi there,
    I want to create a Wire/Connection node between two scene nodes. I want this Wire node to be updated when one of the nodes is moving. In the common scenario I would listen for change events in the target nodes position and update the Wire :
    targetNode1.translateXProperty().addListener(new ChangeListener<Number>() {
    public void changed(ObservableValue value, Number oldValue, Number newValue) {             
    wire.setStartX(targetNode1.getTranslateX());
    wire.setStartX(targetNode1.getTranslateY());
    wire.setEndX(targetNode2.getTranslateX());
    wire.setEndY(targetNode2.getTranslateY());
    The problem is that the target nodes are children of another container nodes(that are actually moving). So listening for change events in the translate properties of the target nodes does not work(their parent nodes are actually moving)
    Is there way to listent for change in the global position of the target nodes relative to the Scene?

    It sounds very similar to a problem I posted about earlier...
    How to implement a UI similar to a UML Diagram with connections?
    I ended up making my own special bounds property, that updates when the parent's special bounds property changes.
    I also had to listen to the parentProperty change event to add/remove my listener on the parent node.
    All in all, a pain in the butt. There should be an easier way.
    The shortcoming of the solution is that all the nodes in the hierarchy must have my special bounds property implemented (ie. they're all classes under my codebase such that I can implement it), which for the moment is true... I'd like a cleaner solution however.

  • P&L Report-Account Group Hierarchy -Position of lower nodes above

    I define P&L Statement hierarchy in ERP using  T Code: KDH2 (account group). The reason why  I don't use standard financial statement version is because it can't include cost object /cost element in the hierarchy.
    Then I designed a query using Bex Query designer. In row item "account number", I tagged the accoung group as hierarchy and select "position of Lower-level Nodes": above
    However, in crystal report, when I recall the database, it is displayed as "higher nodes above." e.g. cost of sales include lower nodes of Material cost and labor cost, it display in Crystal report as:
    Cost of Sales                                5000
                  Material Cost                        3000
                  Labor Cost                           2000
    I want it to display as "lower nodes above":
                 Material Cost                        3000
                 Labor Cost                           2000
    Cost of Sales                                5000
    I have tried in crystal report desinger- -change group option- sort in original order, in asending, in desending , it doesn't work as "lower node above". (i have to group the account ID)
    I don't want to use "sort in specific order" in group option because if it is hard coded, it doesnt faciliate future changes if user changes account group hierarchy in SAP ERP KDH2 (account group).
    To sum up, is there anyone can tell me how to show the hierarchy in Crystal Report as "lower node above"?
    Regards,
    Frances

    I find the solution by myselr: just put the account code in crystal report group footer rather than the group header, it will show lower nodes above as
    Material cost 2000
    Labor cost 3000
    Cost of Sales 5000
    Edited by: Jixiang Fan on May 14, 2011 12:12 PM

  • Display Tree node label/title on page

    I'm using Apex version 4.
    I have a tree and I want to display (below the tree) the label or title of the node value that's selected.
    So my tree query is like:
    SELECT (case when connect_by_isleaf = 1 then 0 when level = 1 then 1 else -1 end) status,
    level,
    office_name title,
    null icon
    How can I display the office_name on my report page below the tree? Can I somehow capture the value selected in a page item and then display that page item below the tree?
    Thanks.

    Hi Ravindra,
    I think it is possible, i have not done it but let me explain how we can do it.
    In <htmlb:treeNode> tag there is an attribute 'text' in
    which we specify title of that treeNode.
    Now you define a page attribute 'treeNodeTitle' type
    edpline and in onCreate assign it value <html><b>MyTreeNode</b></html>
    When you click on this node then you do event handling
    in onInputProcessing, there assign only 'MyTreeNode' to
    treeNodeTitle.
    sample code may look like this...
    <htmlb:treeNode
      id = 'treeNode1'
      text = '<%=treeNodeTitle %>' >
    </htmlb:treeNode>
    Page Attribute
    treeNodeTitle type edpline
    in onCreate
    treeNodeTitle = '<html><b>MyTreeNode</b></html>'
    in onInputProcessing
    in event-handling code for that treeNode write
    treeNodeTitle = 'MyTreeNode'
    I hope this will work.
    Regards,
    Narinder Hartala

  • JTree customize lines position relative to node

    Hi,I have a problem.I have a JTree with nodes that are composed of an Icon and a JTextArea.The horizontal line corresponding to the node positions itself at the middle of the node(that is in the middle of the text) and I want it to be positioned at the beginning of the node(that is to point to the Icon).Any suggestions?Any code?

    Hello again,
    I finally solved the problem.
    For other users here´s one possible solution:
    http://www.q-trax.net/blog/as/getbywithoutroot.htm
    thanks anyway!
    Best rgds!

  • Set root node expanded when the page is opened

    Hi,
    I have a tree in a page having 2 children.
    Currently when I come to the page, the parent node appears, when click on that, it will show the 2 children.
    My requirement is, when come to the page, the parent node should be expanded and show its children.
    Please suggest how can i do this....!
    Thanks,
    ViN

    Hi Arun,
    When initiallyExpanded property of the tree is set to true, all the child nodes also expanded.
    My requirement is to expand only parent node.
    Thanks,
    ViN

  • How to position a flash movie within a web page?

    Hi guys.
    I have a flash movie that is going to be loaded within
    another flash movie via an xml list.
    How can I set the position to load the inserted movie to the
    center of the page?
    At the moment it loads in the top left hand corner.

    Hi there.
    Thanks for replying.
    the website in question is www,ridethespiral.net and if you
    click on pilot map you will see the error.
    The main (Background) flash file is from a template site so I
    didn't write the code.
    But I think this is it.
    //Function used to load external SWF files and call the
    loader MC -------------------------------------------
    function loadMovieClip (externalTarget:String,
    targetRoot:MovieClip) {
    var mcLoader:MovieClipLoader = new MovieClipLoader ();
    var listenerLoad:Object = new Object ();
    listenerLoad.onLoadStart = function (target:MovieClip) {
    loader._visible = true;
    ZigoEngine.doTween (loader,'_alpha',100,0.5,"easeOutExpo");
    //Loading Progress
    listenerLoad.onLoadProgress = function (target:MovieClip,
    bytesLoaded:Number, bytesTotal:Number):Void {
    percent = Math.round (bytesLoaded / bytesTotal * 100);
    loader.percentTxt.text = percent + "%";
    //On Load Complete
    listenerLoad.onLoadComplete = function
    (target:MovieClip):Void {
    ZigoEngine.doTween
    (loader,'_alpha',0,0.5,"easeOutExpo",0,function () {
    loader._visible = false;
    ZigoEngine.doTween
    (content_container,'_alpha',100,0.5,"easeOutExpo",0,function () {
    content_blocker._visible = false;
    mcLoader.addListener (listenerLoad);
    mcLoader.loadClip (externalTarget,targetRoot);

  • How do I find the position of a single character on a page?

    Hi guys,
    I am developing a PDFEditor, but am having trouble implementing the code which finds the location of glyph characters on a page (in device space). I have read the pdf reference on Text, but do not quite understand it.
    I have worked out the individual character spacings, but I cannot accurately find the location of the first character .
    Here is my current attempt:
    float y = CGPDFPageGetBoxRect([current_page pageReference], kCGPDFCropBox).size.height-current_matrix_position.y;
    float x = current_matrix_position.x;
    float xa = a * x + c * y + e;
    float ya = b * x + d * y + f;
    text_position = [NSValue valueWithCGRect: CGRectMake(xa, ya, 15, d)];
    (where text_position is the location of the start character in device space. a,b,c etc come from the Tm operator.
    current_matrix_position is set as a point (e,f) from the cm operator.)
    This code seems to work with some PDF files:
    But does not work with others:
    (Note there is text in the box above the blue which cannot be disclosed for reasons...)
    Is there something I am missing (like another operator?) or is my formula completely wrong.
    Your help would be greatly appreciated

    Hi Irosenth,
    I have been reading the spec and trying to understand it for several weeks. Unfortunately, I am still confused with how to find the coordinates of the text.
    >> You need to parse the content stream(s) that are associated with the page and
    I have done this. My program finds both the cm operator, the tm operator and the font widths etc. Unfortunately, now that I have all of this information, I am unsure what to do with it.
    How do I properly add these two matricies together? I have looked in the spec which describes it as:
    x' = a * x + c * y + e
    y' = b * x + d * y + f
    I tried this and the results worked on some pages, but not on others (several thousand x coordinates out...). I am finding the ISO 32000-1:2008 very confusing in this section.
    >> manage what you find there
    This is the part I am having major trouble with. Using the coordinate transformation matricies, how can I determine the starting coordinate for the first glyph in a text (BT, ET) on a non-scaled page (so 1 unit = 1 pixel) using the matricies?
    Thanks

  • Positioning of variable content section in first page footer

    Hi,
    The below is my requirement. Please suggest your ideas to implement this logic in Documaker studio 11.4
    Table
    Date
    Name
    Polnum
    Prem amt
    D1
    N1
    P1
    Amt1
    D2
    N2
    P2
    Amt2
    D3
    N3
    P3
    Amt3
    Dn
    Nn
    Pn
    AmtN
    Content1 - Which may come from 1-1000 chars as variable from input file
    Content2 - Which may come from 1-1000 chars as variable from input file
    Content3 - Which may come from 1-1000 chars as variable from input file
    Content4 - Which may come from 1-1000 chars as variable from input file
    Explantion of requirement
    The sections content1, content2, content3 and content4 have to be always placed in the first page. The dimension of these content will vary depending on the input. After placing the sections content1, content2, content3 and content4, the rows of the tables has to be printed in the available space and the remaining rows can be printed on the second page..
    Thanks for the help in advance....

    Are you suggesting that this table is in your footer? A footer cannot split across pages. It would have to be a non-footer section to be allowed to split.
    Assuming this is not a footer, the final table section might end up pushed off the page depending upon the mapping of content into the earlier sections. You see, only the section that is currently formatting - via a MLT field or an embedded field referenced in a text area - has opportunity to split as it formats. If the expansion of that section pushes another section to encounter the footer or bottom of the page, then that pushed section goes to the next page. It doesn't have opportunity to split because it is not the one that is currently formatting.
    If by the time you reach the table section it is still on the page, then if the table expands too far it would split the rows across the page boundary, because it is the one being formatted.
    So you see, the result will depend upon whether the expansion of the first 4 sections causes the table section to be pushed off the page or if it is the table formatting itself that causes the expansion.
    Some people decide to instead create independent sections to represent each rows of a table. That way, you don't have one large table section, but multiple smaller ones which will be pushed off one at a time. Unfortunately, independent sections may require you avoid doing something fancy with lines and boxes around your cells. You might have to simplify.

  • Re: similar method for get correct position mouse in node

    The MouseEvent itself has the data you need to compute similar coordinates that the SwingUtilities method does:
    e.getX(); e.getY(); // coordinates of the mouse relative to the component on which the event was fired
    e.getSceneX(); e.getSceneY(); // coordinates of the mouse in the Scene
    e.getScreenX(); e.getScreenY(); // coordinates of the mouse on the Screen
    If you want to get the row in a ListView (or TableView) for a mouse event, however, I would recommend setting a custom cell factory that handles the mouse event for each cell:
    ListView<T> list  = ... ;
    list.setCellFactory(new Callback<ListView<T>, ListCell<T>>() {
         @Override
         public ListCell<T> call(ListView<T> listView) {
              final ListCell<T> cell = new ListCell<T>();
              cell.setOnMouseDragged(new EventHandler<MouseEvent>() {
                   @Override
                   public void handle(MouseEvent event) {
                        int index = cell.getIndex(); // list index: may be out of range if this is an empty cell
                        T item = cell.getItem(); // Item displayed in the cell: may be null if this is an empty cell
              return cell ;
    (I just typed that in here without testing: it may have typos. Obviously replace T with the type for your ListView.)

    The only way I know to do that is to implement a full drag and drop and use the setOnDragOver handler on the cell. Something like:
          list.setCellFactory(new Callback<ListView<T>, ListCell<T>>() {
                @Override
                public ListCell<T> call(ListView<T> listView) {
                    final ListCell<T> cell = new ListCell<>();
                    cell.setOnDragDetected(new EventHandler<MouseEvent>() {
                        @Override
                        public void handle(MouseEvent event) {
                            if (cell.getItem() != null) {
                                Dragboard db = cell.startDragAndDrop(TransferMode.MOVE);
                                ClipboardContent cc = new ClipboardContent();
                                cc.put(dataFormat, cell.getIndex());
                                db.setContent(cc);
                    cell.setOnDragOver(new EventHandler<DragEvent>() {
                        @Override
                        public void handle(DragEvent event) {
                            if (cell.getItem() != null) {
                                System.out.println(cell.getIndex());
                    return cell;
    You may want to do other things with the drag too (setOnDragDropped to process when the drag is ended on a cell, etc.)

Maybe you are looking for

  • Can I use TV only with my MacBook Pro, or I need a TV?

    I have an Apple 30" Cinema Display and a MacBook Pro, so I don't have a TV. Can I use TV directly on my computer without a TV (HOW?), or it doesn't work without a TV?

  • Text engine won't initialize PS CC 2014

    I get the "could not complete your request because something prevented the text engine from being initailized." Have tried trashing font cache files, un-install, re-install. reset all tools. What else can I try? I have PC  Windows 7 Prof i5-3570 CPU

  • ITunes producer will not upload its own files?

    I have tried to publish through the publish process from within IBooks as well as outside of it through Itunes producer. Both stop me at the final upload process. The file that Itunes producer made of my ibook, early in the publish process, is grayed

  • Regarding header item details on same screen

    Hi All, I have 2 internal tables with header and item details and i want to show them on same screen in ALV format. I need to show header on first half of screen and when user double click on 1 line, corresponding item details needs to be shown on lo

  • Where is the default batch class stored for a material?

    Hi, when we execute tcode msc1n for a material/plant/storage location the default classification class is set to PACKAGING. I need to create a similar screen so need to find which tables store this info? I almost have it: kssk-objek = matnr returns 2