Use XML Node Value as Node name and as attribute name

im quite new to XML and XLST. I got an Open Office XML file that I transformed with XLST.
<?xml version="1.0" encoding="UTF-8"?>
<ooo_calc_export scriptVersion="2.2.0" scriptUpdate="2010-12-19" scriptURL="http://www.digitalimprint.com/misc/oooexport/" scriptAuthor="vjl">
   <ooo_sheet num="1" name="Blatt1">
      <ooo_row><Artikelnummer>C12-34567</Artikelnummer><ArttikelnummerAlt/><Details>AAA AAA AAA AAA</Details><Abmessungen/><Bildpfad>file:///cmyk/C12-34567.PSD</Bildpfad><EK>1234,-</EK><VK>3456,-</VK>
        </ooo_row>
      <ooo_row><Artikelnummer>C23-45678</Artikelnummer><ArttikelnummerAlt/><Details>BaB BaB BBB BBB</Details><Abmessungen/><Bildpfad>file:///cmyk/cmyk/C23-45678.PSD</Bildpfad><EK>2345,-</EK><VK>4567,-</VK>
        </ooo_row>
      <ooo_row><Artikelnummer>C34-56789</Artikelnummer><ArttikelnummerAlt/><Details>CaC CaC CaC CaC uli</Details><Abmessungen/><Bildpfad>file:///cmyk/cmyk/C34-56789.PSD</Bildpfad><EK>3456,-</EK><VK>5678,-</VK>
        </ooo_row>
   </ooo_sheet>
</ooo_calc_export>
I transformed the XML with the following XLST:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
  <xsl:output method = "xml" version="1.0" encoding="UTF-8" indent="yes"/>
  <xsl:strip-space elements="*"/>
  <xsl:template match="ooo_sheet">
<xsl:element name="Import">
<xsl:for-each select="ooo_row">
<xsl:element name="Artikel">
  <xsl:element name="Text">
        <xsl:copy-of select="Artikelnummer"/>
        <xsl:copy-of select="Details"/>
        <xsl:copy-of select="Abmessungen"/>
        <xsl:copy-of select="EK"/>
  </xsl:element>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
The result is:
<?xml version="1.0" encoding="UTF-8"?>
<Import>
    <Artikel>
        <Text>
            <Artikelnummer>C12-34567</Artikelnummer>
            <Details>AAA AAA AAA AAA</Details>
            <Abmessungen/>
            <EK>1234,-</EK>
        </Text>
    </Artikel>
    <Artikel>
        <Text>
            <Artikelnummer>C23-45678</Artikelnummer>
            <Details>BaB BaB BBB BBB</Details>
            <Abmessungen/>
            <EK>2345,-</EK>
        </Text>
    </Artikel>
    <Artikel>
        <Text>
            <Artikelnummer>C34-56789</Artikelnummer>
            <Details>CaC CaC CaC CaC uli</Details>
            <Abmessungen/>
            <EK>3456,-</EK>
        </Text>
    </Artikel>
</Import>
I need another child within the node "Artikel" named "Bild". It should have an "href" attribute. The value of the attribute should be the value in the node "Bildpfad".
The result of this transformation should be
<Artikel>
  <Text>
    <Artikelnummer>C34-56789</Artikelnummer>
    <Details>CaC CaC CaC CaC uli</Details>
    <Abmessungen/>
    <EK>3456,-</EK>
  </Text>
  <Bild href="file:///cmyk/C12-34567.PSD"></Bild>
</Artikel>
I want to import this XML into Indesign. It seems that the images path needs to be in a href attribute so Indesign accepts the node as an image object.
Another problem is that Indesign won't import the original xml with selection of the listed xsl to tranform the xml. So I used another xml editor instead to perform the transformation.
Thank you all for your help!

Hi Dorian_fs,
I think we're still missing details here on what exactly it
is you're trying to do? Are you loading this XML via a data set? In
which case, Don's samples would apply? Or are you trying to load
XML independent of data sets and regions, in which case, you are
looking for something that simplifies the access of data from the
resulting XML document? If the latter than perhaps you want to use
XMLDocToObject:
http://labs.adobe.com/technologies/spry/samples/utils/XMLDocToObject.html
--== Kin ==--

Similar Messages

  • How do I use the Index Values property node with a multidimensional array.

    I am using a 2D array to store operator inputs on my front panel.  I only want to display one element to the operator at a time.  I am trying to use the Index Values property node to change the displayed element.  However, I can only get the Rows index to work.  How do I direct the Columns index as well?  The help says to use one per dimension.  I need clarification on what this is talking about.  I've tried adding a second element to the property node, 2 seperate property nodes, and diferent wiring techniques. (series, parallel)

    If you only wire up one of the inputs (col or row) what you get out is a 1D array of either the column or row. If you wire controls to both, then you will get one element out of the array. Getting a single element in a 2D array requires you to specify both a row and column.
    Message Edited by Dennis Knutson on 02-08-2007 08:34 AM
    Attachments:
    Index 2D Array.PNG ‏2 KB

  • Can I use firefox in webview? what is the package name and the activity name?

    Can I use firefox in webview? what is the package name and the activity name?
    I saw : intent.setClassName("com.tencent.mtt", "com.tencent.mtt.MainActivity");
    but what is the name for firefox?

    rahulmcadit wrote:
    The phone is from UK and the carrier on which phone has been locked is "ORANGE". I want to use the same phone in India. I want to unlock the phone. Can you please suggest me what is the procedure to unlock the phone. How can I pay the amount to ORANGE carrier and can use my iphone in India.
    Contact ORANGE to unlock it.
    See this -> http://support.apple.com/kb/HT5014

  • Could take the same JNDI-names for both tags: jndi-name and local-jndi-name

    Hello!
    I try to design the weblogic-ejb-jar.xml descriptor and I ask myself, if I could
    take the same JNDI-names for both tags:
    <jndi-name> and <local-jndi-name> ?
    Could you give me and advice if this is ok?
    Thanks

    if you have two separate interfaces, you cant bind them to the same jndi
    name. you will have a local home that extends EJBLocalHome and a remote
    home called EJBHome. also you need to know which one you are looking up
    so you can cast it properly, and use it property (remote interfaces need
    PortableRemoteObject, remote parameters are passed by value, ...)
    joern kirch wrote:
    Hello!
    I try to design the weblogic-ejb-jar.xml descriptor and I ask myself, if I could
    take the same JNDI-names for both tags:
    <jndi-name> and <local-jndi-name> ?
    Could you give me and advice if this is ok?
    Thanks

  • Outlook Calendar Email Display Name and Reply to Name

    I need help to change the display email address and reply-to-email address used when I create and send calendar invitations from Outlook.
    Here is my setup.
    I am using Outlook 2013 that is connected to an Exchange server.
    I have 2 email systems.
    My main email system is NOT using Outlook.  All of my emails flow through, as an example, [email protected]
    Outlook is used only for my contacts and calendar.  For this email let's call it [email protected]
    Right now when I send a calendar invite it comes from [email protected] and the reply-to-address is [email protected]
    I would like the "from name" and "reply-to" name for all calendar invites to be displayed at [email protected]
    My [email protected] will redirect all calendar invites to [email protected]
    How can I configure Outlook to do this?

    So to my understanding there are 2 different email systems: one handling the @email1.com, based on Postfix/sendmail/Exchange/<other mail server> and one handling the @email2.com based on Exchange.
    If you add an accepted domain in your Exchange organization - @email1.com - then you'll be able to add the [email protected] address to the list of email addresses stamped on your Exchange mailbox. Following this, the recently added address can be specified
    as reply-to address (Primary SMTP Address). On the other email system, you'll have to use @email1.com as an internal relay accepted domain (similar to the notion described
    here) and configure a connector to send email to the Exchange organization for @email2.com. As for the forwarding itself - if that system is also Exchange - the 'targetAddress' attribute could be used, which will instantly forward the email to the '[email protected]'
    value that should be stamped inside (see
    this link); if a different email system, then the equivalent feature of 'targetAddress' should be used. 
    Yet the whole setup is cumbersome to say at least. Could you give more details about what is it you're trying to achieve at a higher level ?

  • Information about file Id, Logical file name and Physical file name

    Hi All,
    I am testing one program. Selection screen has 3 parameters, File Id, Logical File Name and Physical file name. In Physical File name, i am giving complete file name with path. But it is giving error. Please tell me, what is File id and what all information i need to enter for logical file name and physical file name.
    Thanks
    Puneet Aggarwal

    hi,
    try using this for filename.
    parameters : p_file like rlgrap-filename.
    Thanks,
    Gaurav

  • How to find output type givenSapscript form name and print program name

    Hi  Experts,
           Can anyone tell me how to find the output type of  a sapscript form if the print program name and sapscript form name is 
    known.

    Hi,
    There are two ways:
    1. Use table TNAPR .. Here is table give PGNAM as your print program name and FONAM as form name.. Now the field KSCHL will be the output type assigned to your script.
    2. You can also check the NACE t-code.. In that select a application(Corresponds to your area) -> click on Output types tab -> Here you get list of output type.. You need click on Processing Routine folder to get all other info..

  • My brother gave me his old ipod how do I remove his name and put my name on it so itunes will reconignes me

    My brother gave me his classic ipod, how do I remove his name and put my name so my itunes will recognize my computer?

    Hello Darryll,
    Welcome to the Apple Support Communities. If you want to change the name of the iPod, the following article assist with getting that setup for you.
    iTunes 11: Frequently used features
    http://support.apple.com/kb/HT5649
    Then you can change the name and sync the ipod with your library
    iTunes and iOS: Change the name of your iPhone, iPad, or iPod
    http://support.apple.com/kb/ht3965
    Connect your device and open iTunes.
    In the source list (the left-hand column of iTunes), double-click the name of your device.
    Type the new name for your device and press Return on the keyboard.
    Sync the device (press Sync in the bottom right corner of the screen).
    Regards,
    -Norm G.

  • How can I change the "folio name" and the "publication name?

    Hello,
    We have posted a Multi-folio App a single folio in it.
    We would like change the "folio name" and the "publication name” and we tried to do this using the dashboard. However, when clicking “update” we unchecked the “update content” checkbox, because there are no changes to the folio’s content. The problem is that this didn’t change anything in the app: both the "folio name" and the "publication name” remain unchanged…
    Is it possible to do this without having to repost this folio?
    Thanks!
    Olivier.

    The metadata is considered part of the content. Click update again and leave the "update content" checkbox checked.
    Neil

  • Difference sym.getSymbol("name"); and sym.$("name");

    Hej all,
    where is the difference between these two ways in calling a symbol.
    sym.getSymbol("name");
    and
    sym.$("name");
    I now that I use the first one for .play() stuff and the second one for .hide(), .show(), etc.
    But is there a definition, when to use which one?
    Thanks.

    Hi there,
    In addition to what Feloxor mentions, the biggest difference between them is that the sym.getSymbol() method allows you to address the symbol timeline and access any child elements within the symbol (i.e., sym.getSymbol("symbolName").$("childElementName")), whereas sym.$("symbolName") addresses only the element that the symbol instance represents, allowing you to change element properties such as x/y position, width, height, etc. of the symbol instance on the Stage.
    hth,
    Joe

  • I can not transfer date from one hard drive to another, I keep getting an error because I have two of the same file names and one file name is in caps and I cant change the file name

    can not transfer date from one hard drive to another, I keep getting an error because I have two of the same file names and one file name is in caps and I cant change the file name. My original external has an error and needs to be reformatted but I dont want to lose this informations its my entire Itunes library.

    Sounds like the source drive is formatted as case sensitive and the destination drive is not. The preferred format for OS X is case insensitive unless there is a compelling reason to go case sensitive.
    Why can't you change the filename? Is it because the source drive is having problems?  If so is this happening with only one or two or a few files? If so the best thing would be to copy those over individually and then rename them on the destination drive.
    If it is more then you can do manually and you can't change the name on the source you will have to reformat the destination as case sensitive.
    Btw this group is for discussion of the Support Communities itself, you;d do better posting to Lion group. I'll see if a host will move it.

  • Logical file names and Physical file names

    Hi Guys...
         Can you let me know what is the difference between Logical file names and Physical file names?
    Regards,
    Rohit

    Using Logical Files in ABAP Programs http://help.sap.com/saphelp_nw04/helpdata/en/9f/db95e635c111d1829f0000e829fbfe/content.htm
    Creating and Defining Logical Filenames
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3df8358411d1829f0000e829fbfe/content.htm

  • How can I find the specific channel name and modify channel name in automatically in VBS?

    How can I find the specific channel name and modify channel name in automatically in VBS? (DIAdem 9.1)
    I would like to change channel name = "speed01" ... "speed10"  to  channel name = "velocity01"..."velocity10.
    martino

    Hello Martino,
    this script will help:
    Option Explicit
    Dim i
    Dim n
    For i=1 To 10
    If i < 10 then
    n = CNo("speed0" & i)
    Else
    n = CNo("speed" & i)
    End If
    If n > 0 Then
    If i < 10 then
    ChnName(n) = "velocitiy0" & i
    Else
    ChnName(n) = "velocitiy" & i
    End If
    End If
    Next
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • What version of LabVIEW first included Bundle by Name and Unbundle by Name?

    What version of LabVIEW first included Bundle by Name and Unbundle by Name?
    Allen Weekley

    I am auditing software that was originally written a long time ago by someone who is long gone from the company. In a discussion of this, someone offered the theory that Unbundle by Name did not exist in LabVIEW 4.0 as an excuse for one aspect of the poor programming style. I couldn't remember for sure if LabVIEW 3.0 had Unbundle by Name. The question was merely academic.
    There was at one time a chart comparing features of different LabVIEW versions somewhere on the NI web site. Anyone know where it is located, if it is still there?
    Allen

  • Unable to use correctly the value property node in a re-entrant VI

    Hi everybody,
    I am using labview 6.1 and developing an application which call a reentrant SubVI. However when I use the Value Property Node (which I need : the use of local terminal isn't possible in my final application) in the re-entrant SubVI, i get the initial value of the control, not the current value !?
    Is there anybody to explain me why and how to solve this problem ?
    I have attached 3 VIs for a better explanation.
    Thanks.
    Attachments:
    Master.vi ‏9 KB
    Slave.vi ‏23 KB
    globales.vi ‏7 KB

    You just need to create a local variable instead of a property node to read the value of the control that was passed in. Popup on the control and select Create >> Local Variable. Or just wire the control to where you need it. Data flow is still working; Feroz just explained an idosyncracy of how property nodes work in reentrant VIs.
    BTW - I don't mean to turn this into a sales opportunity, but you might want to check out the VI Analyzer Toolkit. It reports the following for a reentrant VI that uses property nodes:
    "You are using an implicit property node in this reentrant VI. This can result in unexpected block diagram behavior, as a reentrant VI will occupy multiple data spaces but will maintain only a single front panel. You should consid
    er either making this VI non-reentrant, or eliminating the use of implicit property nodes."
    I'm not sure how many people would know what the message means, but they would be forewarned and hopefully check into it further (e.g. test with this specifically in mind).
    I filed a bug report to have this investigated further and at least documented better.
    Roy

Maybe you are looking for

  • Error in starting iFS from NT 4.0

    Hi, Im having difficulty in starting "ifsstart" and I am getting the following error message in the the ifsagent & ifsprotocol log files. IfsException in starting ServerManager; FATAL oracle.ifs.common.IfsException: IFS-10620: Unable to construct con

  • What is the compatibility issues restricting use of Dreamweaver MX2004 with Windows 7

    I can't launch an update my website design on Dreamweaver MX2004.  Adobe technicians have informed me the application is not compatible with Windows 7.  The Dreamweaver was already loaded onto this computer when I took over this assignment.  I assume

  • Iphone 5 Time Restrictions

    I'm looking for a way to restrict iPhone 5 usage to certain times of the day.  Has Apple thought of building this type of Restriction into the next OS?

  • Select a text field

    hello, I have a text field, I want when I select this field the cursor shows up after the last character of the text so that I can add characters. I work with forms 10g thank you

  • How to record user action?

    Dear All, I am trying to build a performance testing tool like jmeter. I want to know how jmeter or any HTTP performance tool records user action. I don't know how to write the action recording code. If anybody knows please help me out. The following