Problem with XSLT: xsl:copy

xsl:copy let us copy a node from the source to the result of a XSLT transformation.
My problem is that each element is copied without its attributes !
For example a template:
<xsl:template match="myelement">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
on a element:
<myelement myattribute="value">text</myelement>
will transform this element in the new element <myelement>text</myelement>. The attribute has desappeared.
How Can I do copy my element exactly as it is, with all its attributes ?
thank's.

Yes, but copy-of copies child elements too. And I don't want to do so. What I want is for example that my template generate an element
<myelement myattribute="value">
<myaddedelement>
</myelement>
with an element
<myelement myattribute="value"/>
in the source.

Similar Messages

  • Unable to find appropriate driver for my mcbook air using a ricoh aficio mp36501SP network printer.  had similar problem with another ricoh copier/printer, but was able to resolve that problem entering ip address.  this one wants job code

    unable to find appropriate driver for my mcbook air using a ricoh aficio mp36501SP network printer.  had similar problem with another ricoh copier/printer, but was able to resolve that problem entering ip address.  this one wants job code.  i don't believe mac allows for input on job code or printer code for permission to print

    I'm having similar problems with an HP OfficeJet 6500. One suggestion that improved the situation, but did not totally solve the problem, was to select "OfficeJet Pro L7700" for its drivers.
    One other suggestion is to turn off the printer, then simultaneously hold down the "#" and "9" keys and turn the printer back on. This hot key seems to reset the printer to factory defaults, allowing you to set things up anew.
    Finally, kvetch to HP. Their networking software clearly has problems in its relationship to OSX, but nobody on either side seems motivated to bring in a good therapist.

  • Problems with the xsl element ---- xsl:output method="xml"/ ----

    Hy, my problem is the next, I am trying to read a xml file and transform it in itself but when I do with XSLT, Internet Explorer doesnt show a xml file, just show me the text nodes of the xml file. I have the element <xsl:output method="xml"/>" in the xsl file but I dont Know what Iam doing wrong.
    The next code is from the xsl file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml"/>
    <xsl:template match="/">
    <xsl:copy-of select="catalog"/>
    </xsl:template>
    </xsl:stylesheet>
    The next code is from the xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Edited with XML Spy v2007 (http://www.altova.com) -->
    <?xml-stylesheet type="text/xsl" href="PlantillaXSL.xml"?>
    <catalog dni="4546545">
         <cd numero="2" id="5" color="red">
              <title>Empire Burlesque</title>
              <artist>Bob Dylan</artist>
              <country>USA</country>
              <company>Columbia</company>
              <price>10.90</price>
              <year>1985</year>
         </cd>
    </catalog>
    The result in internet explorer is:
    Bob Dylan USA Columbia 10.90 1985

    All right. I asked because it's unusual to use the ".xml" extension for an XSL file, so I thought it might be an error. But there's nothing wrong with that.
    Next debugging step: is that XSL file actually being used? Insert some debugging code in it so that you can tell.

  • Problem with XSLT

    Dear all,
    I am facing the following problem: I have an XML file, which is used to store information. An XSL stylesheet transformation is used to grab certain information and display it in a webbrowser, based on category and language of the content in the XML file (categories are marked up with ordinary XML tags, language is specified with the xml:lang attribute). At present there are 8 combinations of category and language.
    I am looking for a way to dynamically assign the stylesheet to be used, based on where the user on the website is coming from. That is, the user clicks on a link and the XML doc is opened with a certain stylesheet, which displays data from a certain category in a certain language.
    Can this be done at all? It is important that only one XML doc is the basis for this functionality. Preferably, it should only be one XSL also, but I guess that's not possible.
    Cheers,
    N
    PS: I realise this has nothing to do with Java, I hope you can forgive me posting this question here. I found that there are many very knwoledgable and helpful people here in the Java forums.

    What is your context? If it is the root element, then that test will return true (because there IS a /message/commission element whose type is not 'Initial'), and then the xsl:copy-of will copy the two /message/commission elements under the root.
    If you want to handle each of the commission elements differently, then you need a template that handles each of them. This template can then look directly at the type attribute, and xsl:copy-of itself if the attribute is not 'Initial'.

  • Problem with UTL FILE COPY

    Hi,
    I am facing one small problem in UTL FILE COPY package. We have an automated scheduled batch process. As a daily batch process it moves the files from one folder to other. During movement, it first copies the file from source folder to destination folder using FILE COPY package and then removes the file using FILE REMOVE package from the source folder.
    Few cases are found that the file when files are copied they are copied as 0 bytes in destination folder but the source file had 1 MB file size. The interesting part is I am unable to replicate the issue. Means when i try to run once again the package its working properly and files are copied with correct size. This kind is issue is occuring very rarely though as once in month but the question is why FILE_COPY package is not working properly sometimes.. I am unable to understand.
    Thanks a lot for going through this. Any suggestions.
    Regards,
    Ashish

    Anyhow make sure that the copy will start after the full generation of files.
    You can think like a spool file generation with huge data. In that case initially spool file available with 0 byte only. After finish of query only it shows its actual size.

  • Problem with a digital copy what should i do?

    received the message "an unknown error occurred (-50)" when down loading a digital copy and it won't finish the download I keep getting the same message. My code was good the download started but at 70mb It stopped and I got the message. I've down loaded dozens of digital copies but i've never seen this message before. How do I get it start and finish the download?

    Maybe there is a problem with OOPP
    See http://kb.mozillazine.org/Plugin-container_and_out-of-process_plugins
    Your above posted system details show outdated plugin(s) with known security and stability risks that you should update.
    # Shockwave Flash 10.0 r42
    # Java Plug-in 1.6.0_05 for Netscape Navigator (DLL Helper)
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/
    Update the [[Java]] plugin to the latest version.
    *http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE)

  • Problems with sending carbon copy and blind copy with gmail

    I recently started using Safari and would like to continue as it is fast. But have problems with it when I use Gmail that I don't have in Firefox or Internet Explorer. For example when I want to forward and email to several people using the blind copy or carbon copy feature - each time I click a name i have to move the cursor back into the box manually because each time you add a name the cursor jumps to the subject line automatically. I forward a lot of email, How can I make using these features work with Safari? Any help is appreciated. Thanks.

    I would delete the account on the iPod an recreate the account. It is easy to make an error or enter the setting and hard to find the error.

  • Problem with CCC (Carbon Copy Cloner).... Am I screwed?

    Hello there, I've been using the Apple Discussion Boards since I bought my Quicksilver G4 to do any and all upgrades. I have not had a single problem with any advice careully taken from these boards until now.
    And it's a doosey.
    I just made the queen mother of all computer no-no's. Following the footsteps of others on these boards, I downloaded CCC to make a copy of my os onto a new (Internal) drive. I had been getting "Your start-up disk is almost full" messages and decided to replace my drive. Well, the computer froze during the copy and now my boot disk is shown as "not mounted" (In disk utility) and renamed "disk0s9". And yep, you guessed it, I didn't back up my files.
    The disk I was copying from was a partition, would that have anything to do with the failure? The disk was the 40GB factory drive split into 4 parts... don't ask why, It seemed like a good idea at the time. To put the icing on the cake, much of the data on the other partitions has vanished as well.
    I'm (mostly) prepared to suck this up a loss and hard-learned lesson. Is there any hope of retrieving the data?
    What can you guys tell me?
    '02 Quicksilver G4   Mac OS X (10.3.9)  

    As I mentioned, it is a partition of the old drive that has been "damaged", not the entire drive itself. And I had installed OSX onto one of the undamaged partitions (that's what I'm using now), but what I need is to get my user settings and data. So, Yes the old drive does work, but the partition that had my OS on it is "Not Mounted". Is there something I can do to make it readable without formatting/erasing it?
    In disk utility the partition is named "disk0s9" in shadowed type. When you click on it, at the bottom the only specs are 1) the Mount Point which reads "Not mounted" and 2) Capacity, which reads "9.6GB" [and the bytes].
    I had already gone through and deleted everything I didn't need in order to make space until I could buy a new drive (actually twice). I even moved many groups of files onto different partitions.
    I cannot afford to purchase any software or pay a Mac consultant to Run DiskWarrior or Data Rescue on my drive. That would be nice.
    I just tried to verify the disk in Disk utility and got this message:
    Verifying volume “disk0s9”
    Checking HFS Plus volume.
    Invalid B-tree node size
    The volume needs to be repaired.
    Volume check failed.
    Error: The underlying task reported failure on exit (-9972)
    1 volume checked
    0 HFS volumes verified
    1 volume failed verification
    That's jibberish to me....
    '02 Quicksilver G4   Mac OS X (10.3.9)  

  • Xmlns attr for element nodes creating problem with xslt

    Hi all,
    I m facing a small issue. I have a xml file for which i have written a xsl file to transform to another xml(demo.xml).I am not able to select the nodes which have xmlns attribute. Can u tell me what has to be done.Snapshot of files:
    xml file:
    <ROWSET>
    <ROW>
    <INDEX version="1.0" >
    <SCHEMA>AD Design</SCHEMA>
    <NAME>AD_FILES_N1I</NAME>
    </INDEX>
    <INDEX version="1.0" xmlns:doc="http://xmlns.oracle.com/ku">
    <SCHEMA>AD Design</SCHEMA>
    <NAME>AD_FILES_N1I</NAME>
    </INDEX>
    </ROWSET>
    </ROW>
    xsl File
    <?xml version='1.0' encoding='utf-8' ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml"/>
    <xsl:template match="/ROWSET">
    <xsl:apply-templates select="ROW/INDEX"/>
    </xsl:template>
    <xsl:template match="ROW/INDEX">
    <xsl:copy-of select="."/>
    </xsl:template>
    </xsl:stylesheet>
    O/P xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <INDEX version="1.0" >
    <SCHEMA>AD Design</SCHEMA>
    <NAME>AD_FILES_N1I</NAME>
    </INDEX>

    Got the solution ..
    use these code:
    <xsl:template match="INDEX|INDEX[namespace-uri(.)='http://xmlns.oracle.com/ku']">
    <xsl:copy-of select="."/>
    </xsl:template>
    Cheers,
    Dhanu

  • Problems with album art copying to ipod touch

    I got a 2nd generation ipod touch for christmas and am having some problems with the album art. I have all of the album art set up in itunes, and when I right click on a song and tell it to 'get info' it shows the album art picture fine (in my itunes library as well as in my ipod's music library), but when the song is actually playing on the ipod the screen is just blank. It isn't just the white background with the music notes like a song with no album art at all, it's just a black screen. When I flip the ipod sideways and browse through the albums all of the album art shows up except for a few which are blank as well. Anybody know why this is happening? Another weird thing is that the album art will show up for maybe one or two songs in the album, but the vast majority are just showing a blank black screen with no picture. Anyone else having this problem?

    "And now I can't get rid of that cover w/o deleting the whole songlist."
    are you sure? if you go to either album info (right clicking on the album in grid view) and double clicking in the album art section, you should be able to use any picture you have saved on your machine by navigating to that picture. OR right clicking individual tracks, then get info, and going to 'artwork', and then deleting it there (you might have to delete them all individually, but it beats having the wrong art there)

  • Problem with XSLT Transformation on BPM

    Hi there,
    I have a 1:N File --> Idocs Scenario with BPM, Inside the BPM i have an XSLT Transformation that has a problem i cant figure out, basically this XSLT Groups the file structure like this:
    <File>                                                *                  <Shipments>
       <Route>                                         *                     <Route>
          <Id>1</Id>                                   *                         <Id>1</Id>
          <delivery>1</delivery>               *                         <delivery>1</delivery>
       </Route>                                        *                         <delivery>2</delivery>
      <Route>                                          *                     </Route>
          <Id>1</Id>                                   *                     <Route>
          <delivery>2</delivery>               *                         <Id>2</Id>
       </Route>                                        *                         <delivery>3</delivery>
      <Route>                                          *                         <delivery>4</delivery>
          <Id>2</Id>                                   *                      </Route>
          <delivery>3</delivery>               *                   </Shipments>
       </Route>                                        *
       <Route>                                         *
          <Id>2</Id>                                   *
          <delivery>4</delivery>               *
       </Route>                                        *
    </File>                                               *
    It's supposed to generate 1 Route Segment for each disctint Route Id on the Source file, it has always worked fine as we ran several tests before going into production system, but now, sometimes it misses a few routes for example the output will be 25 different Routes for a source file that 28, or 2 routes from a file that as 3.
    I have tested the XSLT on the repository and it works fine all the time, same thing when using xml spy, i always download the payload i get from the file adapter, i got a source file from PRD that has 28 routes and i ran the whole scenario on QAS and it generated 12 routes only, im about to open an OSS message but first i wanted to know if anyone has seen something like this, thanks in advance for all the help you guys can provide.
    Best Regards,
    Roberto.
    p.s. i can send the XSL if needed or anything just ask for it.

    Hi,
    Basically because i  have to do 2 transformations, first i run the XSLT to group all the deliveries and such, and then i do a graphic mapping to split it into single Shipment Idocs, i dont know how to group by id on graphical mapping..., anyway i don't think the fact that im using BPM would finally alter the xslt result,
    Regards,
    Roberto.

  • HP Photosmart 5525 problem with scanning and copying

    Hello Everyone,
    I bought a new HP Photosmart 5525 few months ago and it was working fine with everything but suddenly it stopped scanning and copying. while copying it doesnt do anything and while scanning  it gives the error message
    " Scanner communicatioon cannot be established. Ensure your product is  powered on, check the connection, and ensure your network is functioning properly"
    i tried everything but i couldn't fix it. i would really appriciate any sort of help.

    Welcome to the HP Community @Sekhon ,
    I read about the issue you're having with copying and scanning from your Photosmart 5525 unit, and wanted to reach out to you.
    I would personally think that there could be a "Scanner failure" with your printer, and would like you to check out a post from my colleague @RnRMusicMan below and follow the guide he suggested to someone else with the same issue. If the copies still do not work when done troubleshooting, call technical support directly to discuss your printer replacement options with HP.
    Photosmart 5525 Scan Problem (Component is broken)
    Please call our technical support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region. http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html
    Good luck!
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • Problem with permissions when copying files over network

    This is my setup. Our design studio have several iMacs that the designers use for open projects, when they are finished I copy them over to a G4 which has a SATA raid in it which is used as a file-server for all closed jobs, photos and logos. The file-servers mount point was created using an app called 'Sharepoints'. The iMacs run 10.5.7 the G4 runs 10.4.11.
    When I try and copy over a folder full of folders/files for a given project into the given clients folder. I keep getting the error, "the operation cannot be completed because you do not have sufficient privileges for "filename".
    If I get info for the given file the owner, group and everyone have read & write access. The client folder on the file-server has the owner, group and everyone having read & write access. I can drag that file by itself over to the file-server and it will copy fine with out the error.
    This is doing my head in, the quickest way around the problem is to archive the folder, copy it over and then un-archive it.
    Can anyone shed any light on why this is happening and what I should to to fix the problem. Thanks

    Bump

  • Problems with XSLT Structure

    Hi,
    I'm doing some XSLT mapping to transform the input XML which is coming to XI from a non-SAP application which do not have any namespace prefix. All I'm doing in the transformation is adding the namespace prefix to the xml so that XI can understand the incoming xml message. my incoming xml is in this format
    <?xml version="1.0" standalone="yes" ?>
    <response xmlns="http://www.test.com/it">
      <request_id>UNKNOWN-TEST-1181313012309</request_id>
      <request_type>CREATE_TICKET</request_type>
      <result>APPROVED</result>
      <service_provider>VERIZON</service_provider>
      <extra>
        <extra_ReqAck_AckComment>A trouble ticket has already been
                                created for this circuit</extra_ReqAck_AckComment>
        <extra_ReqAck_ackType>Request_Completed</extra_ReqAck_ackType>
        <extra_ReqAck_date>2007-06-08</extra_ReqAck_date>
        <extra_ReqAck_time>10:29:17</extra_ReqAck_time>
      </extra>
      <vendor>
        <ticket_id>CARC349201</ticket_id>
      </vendor>
    </response>
    And my output xml should be in the following format
      <?xml version="1.0" standalone="yes" ?>
    <ns1:response xmlns:ns1="http://www.test.com/it">
      <request_id>UNKNOWN-TEST-1181313012309</request_id>
      <request_type>CREATE_TICKET</request_type>
      <result>APPROVED</result>
      <service_provider>VERIZON</service_provider>
      <vendor>
        <ticket_id>CARC349201</ticket_id>
      </vendor>
    </ns1:response>
    Here is my xsl file to
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" indent="yes"/>
       <xsl:template match="*">
    <ns1:response xmlns:ns1="http://www.test.com/it">
            <request_type>
              <xsl:value-of select="request_type"/>
            </request_type>
            <service_provider>
              <xsl:value-of select="service_provider"/>
            </service_provider>
             <vendor>
               <ticket_id>
                 <xsl:value-of select="ticket_id"/>
               </ticket_id>
               <ticket_status>
                 <xsl:value-of select="ticket_status"/>
               </ticket_status>
             </vendor>
        </ns1:response>
        </xsl:template>
    </xsl:stylesheet>
    When I use this stylesheet. I'm getting this response this is not adding the values to the nodes.
    <?xml version="1.0" encoding="utf-8"?>
    <ns1:response xmlns:ns1="http://www.test.com/it">
      <request_type/>
      <service_provider/>
      <vendor>
        <ticket_id/>
        <ticket_status/>
      </vendor>
    </ns1:response>
    I would really appreciate if anyone had ever came across this problem or had found solution.
    Thanks,
    Joe.P

    Hi Udo,
    Here is the problem as long as I do have namespace in my input xml that's coming from non sap application the XSLT transformation is failing. I did what you have suggested and here is the style sheet.
    <?xml version="1.0" encoding="utf-8" ?>
    <xsl:stylesheet  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
      xmlns:ns1="http://www.test.com/it/app" >
         <xsl:output method="xml" version="2.0"  indent="yes"/>
         <xsl:template match="/">
         <ns1:response>
             <request_type>
              <xsl:value-of select="//request_type"/>
             </request_type>
              <result>
               <xsl:value-of select="//result" />
               </result>
               <result_reason>
               <xsl:value-of select="//result_reason"/>
               </result_reason>
               <service_provider>
              <xsl:value-of select="//service_provider"/>
               </service_provider>
             <vendor>
                <ticket_id>
                 <xsl:value-of select="//ticket_id"/>
                 </ticket_id>
                 <ticket_status>
                 <xsl:value-of select="//ticket_status"/>
                 </ticket_status>
             </vendor>
          </ns1:response>
        </xsl:template>
    </xsl:stylesheet>
    and as I mention in the initial posting the input xml does have a name space in the response node. so what I tried is I removed the namespace from the input xml from the response node and that works. But I can't remove the namespace from the input xml since that's coming from non sap application.
    Thanks,
    Joe.P

  • XMP Sidecar problems with remove and copy

    Perhaps it should be documented that File.remove() does not delete the corresponding .xmp file.  I think it can be argued that removing the xmp is more correct than leaving the sidecar there.<br /><br />This leads to problems when subsequently renaming some other file (with .xmp) to the name of the deleted file.  The rename gets an error, claiming the file exists but not mentioning that it is the invisible .xmp that actually exists.<br /><br />Then, oddly, ESCing from the error dialog actually does rename the file, but renames the corresponding .xmp as <name>(1).xmp -- attaching the wrong sidecar to the renamed image.

    Jack,
    This is pretty much as designed. The File class knows nothing about sidecars. Try using the Thumbnail class instead. A Thumbnail object in Bridge scripting should have all the built-in sidecar file smarts that Bridge uses when you manipulate thumbnails in the Bridge user interface.
    -David Franzen
    Adobe Bridge Quality Engineer

Maybe you are looking for

  • Best way to implement FREE purchase?

    Hi, I have purchases that are free for logged in users. What's the best way to implement a no-payment solution? Would having the payment fields hidden and COD auto-selected if the amount field is 0.00 a good idea? Is there a better way anyone has imp

  • Change of the dialing codes for landlines in Saudi Arabia

    After adding number (1) after zero to the geographic zone codes in KSA (Government website: http://www.citc.gov.sa/English/MediaCenter/awarenesscampaigns/Pages/PR_AWR_004.a spx ) we start face small problems. and becuse I travel I saved all my contac

  • Errors Installing on a MAC

    Installing Premiere Elements 10 on a MAC.  At 51% process stops and I get a series of DW050 and DW006 errors.  What is the solution?

  • Default framework properties ( urgent )

    Hi, Unknowling i have turned off the visibility of 'com.sap.portal.innerpage'-(desktop innerpage) Iview in Default framework page. After that i am not able to see anything even if logged in as a super admin ? How to turn the visibility again ? Pts as

  • Email PO's

    Hi SAP Gurus, Is there not a way that we can set POs to e-mail as soon as they are saved? Thanks Anusha