Xslt Problem (var in var)

I have an xml file that looks, like this:
<overschrijving soort="eigenrek" kleur="">
     <veld naam="Memodatum (DD/MM/JJ)">
          <omschrijving>den datum</omschrijving>
          <type breedte="10" aantal="1" maxlength="10" typecode="1">text</type>
          <veldnaam n1="Dyl0702_MemoDt" n2="blabla"/>
          <structuur>DD-MM-JJJJ</structuur>
          <body id="1.1"/>
          <controle controle1="" />
     </veld>
</overschrijving>
Now I made a loop with in my xsl file (like this:)
<xsl:template name="herhaal">
               <xsl:param name="i" select="2"/>
               <xsl:if test="$i > 0">
               <input type="{type}" name="{./veldnaam/@n{$i}}" size="{./type/@breedte}" maxlength="{./type/@maxlength}"/>
          <xsl:call-template name="herhaal">
               <xsl:with-param name="i" select="$i - 1"/>
          </xsl:call-template>
          </xsl:if>
          </xsl:template>
my problem is this line:
<input type="{type}" name="{./veldnaam/@n{$i}}" size="{./type/@breedte}" maxlength="{./type/@maxlength}"/>
and especially this:
name="{./veldnaam/@n{$i}}"
As you can see in my xml file, veldnaam has got 2 attributes (n1 and n2).
so in the loop I have to do it like: n(value i)
But that won't work. How can I solve this?
thanks in advance,
Michael

I solved it like this:
<overschrijving soort="eigenrek" kleur="">
     <veld naam="Memodatum (DD/MM/JJ)">
          <omschrijving>den datum</omschrijving>
          <type breedte="10" aantal="5" maxlength="10" typecode="1">text</type>
          <veldnaam>
               <naam nummer="1" inhoud="aaaaa"/>
               <naam nummer="2" inhoud="bbbbb"/>
          </veldnaam>
          <structuur>DD-MM-JJJJ</structuur>
          <body id="1.1"/>
          <controle controle1="" />
     </veld>
xsl:
<xsl:template match="veld[./body/@id='1.1']">
          <xsl:call-template name="herhaal">
          </xsl:call-template>
          </xsl:template>
          <xsl:template name="herhaal">
          <xsl:param name="type" select="./type"/>
          <xsl:for-each select="./veldnaam/naam">
          <xsl:variable name="testg" select="@inhoud"/>
          <input type="{$type}" name="{$testg}" size="{$type/@breedte}" maxlength="{$type/@maxlength}"/>
          </xsl:for-each>
          </xsl:template>
and now it works.
But suppose I want to have:
<veldnaam>
               <naam>aaaaa</naam>
               <naam>bbbbb</naam>
          </veldnaam>
How do I do it then?
with an attribute it's just @ something, but with this?
I tried:
<xsl:variable name="testg" select="./veldnaam/naam"/>
and:
<xsl:variable name="testg" select="{./veldnaam/naam}"/>
but none of those seemed to work.
greetings from Belgium (Brussels),
Michael

Similar Messages

  • When installed JDK but I have problem with System vars may install bundle

    When installed JDK but I have problem with System vars may install bundle [netbeans&JDK] WITHOUT UNISTALLING initial JDK or needed uninstall first ?

    With the word 'automatically', yes you do need pulseaudio. I'm sure you could cook up some udev or related rule to do that in Alsa, but pulseaudio would be easier.

  • Problems with partion /var

    Hello,
    I have solaris 10 installed on an Virtual Machine and suddenly partition /var was not accessible.
    A reboot solved the problem but after about 12 hours the problem reappeared.
    Also with fdisk I have done:
    umount /var
    fsck /var
    ** /dev/rdsk/c1t0d0s3
    ** Last Mounted on /var
    ** Phase 1 - Check Blocks and Sizes
    ** Phase 2 - Check Pathnames
    ** Phase 3a - Check Connectivity
    ** Phase 3b - Verify Shadows/ACLs
    ** Phase 4 - Check Reference Counts
    ** Phase 5 - Check Cylinder Groups
    CORRECT BAD CG SUMMARIES? y
    CORRECTED SUMMARY FOR CG 0
    FRAG BITMAP WRONG
    FIX? y
    CORRECT GLOBAL SUMMARY
    SALVAGE? y
    Log was discarded, updating cyl groups
    4490 files, 364788 used, 25455971 free (4611 frags, 3181420 blocks, 0.0% fragmentation)
    ***** FILE SYSTEM WAS MODIFIED *****
    I also have found in /var/adm/messages :
    scsi: [ID 107833 kern.warning] WARNING: /pci@0,0/pci1000,30@10 (mpt0): right before the problem appeared
    Can I do something so the problem doesn't appear any more?
    null

    Hello,
    I have solaris 10 installed on an Virtual Machine and suddenly partition /var was not accessible.
    A reboot solved the problem but after about 12 hours the problem reappeared.
    Also with fdisk I have done:
    umount /var
    fsck /var
    ** /dev/rdsk/c1t0d0s3
    ** Last Mounted on /var
    ** Phase 1 - Check Blocks and Sizes
    ** Phase 2 - Check Pathnames
    ** Phase 3a - Check Connectivity
    ** Phase 3b - Verify Shadows/ACLs
    ** Phase 4 - Check Reference Counts
    ** Phase 5 - Check Cylinder Groups
    CORRECT BAD CG SUMMARIES? y
    CORRECTED SUMMARY FOR CG 0
    FRAG BITMAP WRONG
    FIX? y
    CORRECT GLOBAL SUMMARY
    SALVAGE? y
    Log was discarded, updating cyl groups
    4490 files, 364788 used, 25455971 free (4611 frags, 3181420 blocks, 0.0% fragmentation)
    ***** FILE SYSTEM WAS MODIFIED *****
    I also have found in /var/adm/messages :
    scsi: [ID 107833 kern.warning] WARNING: /pci@0,0/pci1000,30@10 (mpt0): right before the problem appeared
    Can I do something so the problem doesn't appear any more?
    null

  • Real simple xslt problem/question

    Hi, i have a real simple xslt problem but i just cant figure out how to do it by looking at various examples on the net. i have a xml document and in it are some elements with a "result" tag name. i want to use xslt to reproduce exactly the same xml document except with an attribute called "id" added to those elements with a "result" tag name. i'm sure that theres a simple solution to it but i just cant figure it out. any helps greatly appreciated, thanks

    Start with the XSLT identity transform (I don't have it handy and it's fairly long, but you should be able to google it up). Add this:<xsl:template match="result">
      <result id="">
        <xsl:apply-templates>
      </result>
    </xsl:template>

  • Bash ${var} vs "$var"

    When you make a package when you can not be totally sure that the variable contents does not contain spaces you should use "$var" instead of $var or ${var}. Actually the ${var}  is only useful if need some replacement function you can read about in the man.
    To see the difference in action try:
    $ A="bye bye bye"; touch ${A}
    and
    $ A="bye bye bye"; touch "$A"
    Otherwise try:
    $ mkdir a\ a\ a
    $ cd a\ a\ a
    and inside create a PKGBUILD with this contents:
    pkgname=a_a_a
    pkgver=1
    pkgrel=1
    pkgdesc="ah ah ah"
    arch=(i686 x86_64)
    url=""
    license=('WTFPL')
    md5sums=()
    build() {
    cd /
    cd ${startdir}/pkg
    touch "testing spaces"
    return 0 }
    executing pkgbuild you'll see it does not work as intended. The second line does not override the first.
    Instead using "$startdir" works flawlessly.
    In fact the {} does nothing in this cases.
    My advice is: if you are not really desperate for diskspace ALWAYS use "$VARIABLE" you can not go wrong. If you are desperate use "$VARIABLE" every time you can not be sure the variable will never contains spaces or other dividing characters (e.g. $pkgver).
    Ok, flame war ON!
    Edit: Little mistake fixed. But it does not change the whole meaning.
    Last edited by ezzetabi (2008-09-27 18:18:34)

    @ezzetabi: A valid use case for ${} without array indexing, replacement, and so on, is if you want to do:
    MYVAR1="some words perhaps with space"
    MYVAR2="a few words before ${MYVAR1}s but not so many"
    You could find a way to do that using only "$MYVAR2" instead, but why bother?
    Granted this kind of use case doesn't come up in PKGBUILDs. But I'd try to explain to people the difference between these, rather than tell them to always use one of them.
    ${VAR} is a way to separate the specification of your variable name from the surrounding text. For instance, you may want to say ${VAR}more_text. When the surrounding text isn't valid in a variable name (e.g., if it's spaces), then the ${} isn't needed. But it's a helpful habit to always use it anyway.
    "$VAR" and "${VAR}" are ways to chunk together the values stored in VAR. If you're passing this value to a command or another variable, e.g. in:
    ANOTHERVAR="$VAR"
    rm -f "$VAR"
    then if there's any chance that VAR has whitespace in it, you should use surrounding quotes. Otherwise here's what happens. Suppose VAR="first second". Then:
    ANOTHERVAR=$VAR
    rm -f $VAR
    will be read as:
    ANOTHERVAR=first second
    rm -f first second
    which means: set ANOTHERVAR to "first" and execute the command "second", and try to rm each of the files "first" and "second". There are times where that is what you want to do. But usually you'd want to do this instead:
    ANOTHERVAR="first second"
    rm -f "first second"
    and to get that result you have to surround your $VAR (or ${VAR}) in double quotes.
    Last edited by Profjim (2008-09-28 14:13:42)

  • ExceptionInInitializerError: problems with static vars...

    Hi!
    I got an Env class.
    It has many static variables:
    public static LogFile log=new LogFile("log.log");
    ....and other LogFiles, IniFiles, Connection, etc.
    I dont want to send this vars via parameters to other objects...
    I want to handle the logs globally.
    So, when I try to call the Env.log.addline("...") from other objects then it causes an ExceptionInInitializerError....(and NullPOinterException)
    Why? I think its a simple thing for you, but I'm new in Java developing.
    Please help me!
    Is there other way to declare global variables, that can reached by any other class?

    Is there other way to declare global variables, that can reached by any other class?No, you're doing it correctly by what you have posted here - there is something else you're coding incorrectly.
    Please post a short, concise, executable example of what you're trying to do. This does not have to be the actual code you are using. Write a small example that demonstrates your intent, and only that. Wrap the code in a class and give it a main method that runs it - if we can just copy and paste the code into a text file, compile it and run it without any changes, then we can be sure that we haven't made incorrect assumptions about how you are using it.
    Post your code between [code] and [/code] tags as described in Formatting Help on the message entry page. Cut and paste the code, rather than re-typing it (re-typing often introduces subtle errors that make your problem difficult to troubleshoot). Please preview your post when posting code.

  • Problemi con aggiornamento varie app in cretive cloud su mac

    Problemi con aggiornamento di varie app in cretive cloud sul mac os x Maverich

    Please specify the error you are getting.
    Regards,
    Romit Sinha

  • [SOLVED] Problem in moving /var to new partition

    Hi,
    I setup a new systemd Arch instalation on an SSD and migrated successfully from my old initscripts based HDD setup. I have 2 problems now, one leading to another.
    I wanted to move /var to a partition on HDD and followed the following steps.
    Created a new reiserfs partition for var on my HDD using gparted. Labelled it as "var"
    Rebooted to emergency mode and mounted it. (I remounted root as read-write)
    # mount /dev/sda8 /mnt/new_var
    Copied var contents to new_var
    # cd /var
    # cp -Rax * /mnt/new_var/
    # cd /
    # mv var var.old
    # umount /mnt/new_var
    # mkdir var
    # mount /dev/sda8 /var
    Added the following line to /etc/fstab
    LABEL=var /var reiserfs defaults 0 1
    When I reboot after this, systemd is timing out waiting for a var partition. Here is an pic taken during boot.
    I restored the old var using the emergency shell and could reboot properly. I tried the same thing as a normal user using sudo after the system was up. (During the moving, I got sudo warnings because the sudo folder in /var/db wasnt there.)
    With the new var partition in place, I proceeded to install a few packages. But when I rebooted, I the same thing happened again and had to get into emergency shell and restore the old var.
    However, after this, the packages which I installed in the interim are not available in pacman database.
    So,
    1. How can I move /var to a separate partition and still keep systemd happy?
    2. Is there a way to rescan or rebuild the pacman database? Will syncing the 2 different var setups that I've solve the problem? If so, how can I sync them?
    Last edited by kungsu (2012-11-04 14:54:25)

    I'm thinking in collision propabilities here. How probably might the device node change? I have machines that keep doing this without a real reason. I'd prefer labels on such machines. Other machines don't - without a real reason as well. I'd prefer device node notation on such machines. Labels can be changed manually, new partitions can be added and USB sticks with labled partitions can be inserted. While the USB situation should not be a big deal, both, labels as well as device nodes can be subject to changes, collisions and other arbitrary events. The only thing that is unlikely to change (for no obvious reason), be altered by accident or made collide with another one, are UUIDs.
    I would not say using lables is bad, it's just that if you already have an issue, why not rule that out? It seemed to have solved the issue, it can be as easy as playing safe sometimes. Furthermore, the reason why I recommended to change the label from "var" to something else, is how common "var" is. It is like using a keyword in a programming language as a variable name, it may or may not work, so why not make it a habbit of not using such meta-keywords at all?
    EDIT: There is no particular reason, I suspect the lable isn't set correctly. Maybe there is a problem with the partition table - that's where I'd suspect the LABLE to be stored.
    Or maybe you just did the whole by-label thing wrong.
    "/dev/disk/by-label/var" instead of LABEL="var"…
    Last edited by Awebb (2012-11-04 15:27:43)

  • [AS] Problem setting a var to geometric bounds

    Hi,
    I am trying to set a var to geometric bounds of identified object and get a error message.
    Assuming that a page item is labeled "LogoBox"
    tell application "Adobe InDesign CS3"
    tell active document
    set myobj to page items whose label is "LogoBox"
    --if myobj exists then display dialog "Hey, I do exist !"
    set objbounds to geometric bounds of myobj --(1)
    end tell
    end tell
    (1) here is the error message I get :
    i "Impossible dobtenir geometric bounds of {rectangle id 192 of page id 178 of spread id 173 of document \"file_1.indd\" of application \"Adobe InDesign CS3\"}."
    >meaning that the script can't obtain geometric bounds...
    Where is the error ? Thanks for help in advance.
    Loic

    tell application "Adobe InDesign CS3"
         tell active document
              set myobj to every page item whose label contains "LogoBox"
              if myobj is not {} then display dialog "Hey, I do exist !"
                set objbounds to geometric bounds of myobj 
         end tell
    end tell                         
    ~Mike

  • Problem with static vars of SQLJ java stored procedure

    Hi,
    When I'm calling a PL/SQL stored procedure that call a Java stored procedure from another Java stored procedure, the second call to the Java stored procedure does not see the first Java stored procedure static variables.
    Why is that?
    Can I configure it to work otherwise so all the Java stored procedure calls in this session will share the same static variables?
    Thanks

    Hi:
    Remove your ; at the end of the sql string.
    String sql = "SELECT VERSION_OFA FROM XX_PARAMETERS";
    I don't know why JDev accept the ; at the end of string in a prepare statement but AFAIK its not legal.
    If your are using the SQL pane of JDev may be the tool strip the ; for you.
    Best regards, Marcelo.

  • Problem getting session vars to stay defined

    I am frustrated please help. I have used earlier versions of
    CF but cf 8 is very new to me. I want to set session variables with
    in the application.cfc, I thought I had it correct for session
    management to be initiated, as session variables can be defined.
    However using them with SSL... well - when a user accesses a page
    that is under the secure socket layer the variables are undefined.
    I dont understand what is occuring. This is what I have in my
    application.cfc file to start session management:
    <cfcomponent output="false" hint="Handles application
    level events.">
    <!--- Set up the application. --->
    <cfset THIS.Name = "AppCFC" />
    <cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 0, 60,
    0 ) />
    <cfset THIS.SessionManagement = true />
    <cfset THIS.SetClientCookies = false />
    <CFSET request.dsn = "wlaw" />
    </cfcomponent>
    ALL HELP IS APPRECIATED
    Thank you in advance!
    Mike Dooly

    problem fixed!
    Thank you for your input, I discovered this morning that it
    was in my
    application.cfc file that I had made the error... too weird
    cause CF never complained, it just did not provide me with session
    scope...
    I am once again smiling, dont ask me why but it feels
    good.........
    mdooly

  • XSLT problem passing raw XML

    Hello,
    I've a problem passing a piece of raw XML code to an external assembly to do some tasks.
    The problem is that if I use an XSLT like this:
    <xsl:template name="xml-to-string-called-template">
       <xsl:param name="param1" />
              <xsl:element name="ns0:Root">
                  <xsl:variable name="tryThisTemplate">
                      <xsl:text disable-output-escaping="yes"></xsl:text>
                          <xsl:call-template name="identity" />
                      <xsl:text disable-output-escaping="yes"></xsl:text>
                  </xsl:variable>
    <xsl:copy-of select="$tryThisTemplate" />
               </xsl:element>
    </xsl:template>
    <xsl:template name="identity" match="@*|node()">
       <xsl:copy>
    <xsl:apply-templates select="@*|node()" />
       </xsl:copy>
     </xsl:template>
    I have as output the XML with all tags like expected (the TestFunction take a string as input ad return the same string as output), like this:
    <ns0:Root xmlns:ns0="http://BizTalk_Server_ProjectDemo.SchemaOut1Node">
    - <ns0:Travel xmlns:ns0="http://BizTalk_Server_ProjectDemo.SchemaIN">
      <DateTimeStart>1999-05-31T13:20:00.000-05:00</DateTimeStart>
      <Field>Field_0</Field>
      </ns0:Travel>
     </ns0:Root>
    The problem is that if I try to pass the variable to my external assembly, in this way:
    <xsl:template name="xml-to-string-called-template">
       <xsl:param name="param1" />
              <xsl:element name="ns0:Root">
                  <xsl:variable name="tryThisTemplate">
                      <xsl:text disable-output-escaping="yes"></xsl:text>
                          <xsl:call-template name="identity" />
                      <xsl:text disable-output-escaping="yes"></xsl:text>
                  </xsl:variable>
                  <xsl:variable name="pCC" xmlns:ScriptNS0="http://schemas.microsoft.com/BizTalk/2003/ScriptNS0"
    select="ScriptNS0:TestFunction($tryThisTemplate)" />
                    <xsl:text disable-output-escaping="yes"></xsl:text>
    <xsl:copy-of select="$pCC" />
                    <xsl:text disable-output-escaping="yes"></xsl:text>
               </xsl:element>
    </xsl:template>
    saving its return value and printing it, I have as output the values of fields contained in $tryThisTemplate variable, and not all the XML like I need:
    <ns0:Root xmlns:ns0="http://BizTalk_Server_ProjectDemo.SchemaOut1Node">1999-05-31T13:20:00.000-05:00
    Field_0</ns0:Root>
    What can I do to pass all the raw XML to my function and not the values of its fields?
    I tried to declare the output method as like xml than html or text but nothing changed

    First, of all your input xml has invalid namespace declaration, is this like below what mean to say:
    <ns0:Root xmlns:ns0="http://BizTalk_Server_ProjectDemo.SchemaOut1Node">
      <ns1:Travel xmlns:ns1="http://BizTalk_Server_ProjectDemo.SchemaIN">
        <DateTimeStart>1999-05-31T13:20:00.000-05:00</DateTimeStart>
        <Field>Field_0</Field>
      </ns1:Travel>
    </ns0:Root>
    Second, you can achieve what you are trying to map using very simple map like below:
    and you can see the xslt is generated like below:
    <?xml version="1.0" encoding="UTF-16"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0 userCSharp" version="1.0" xmlns:s0="http://BizTalk_Server_ProjectDemo.SchemaIN" xmlns:ns0="http://BizTalk_Server_ProjectDemo.SchemaOut1Node" xmlns:userCSharp="http://schemas.microsoft.com/BizTalk/2003/userCSharp">  <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />  <xsl:template match="/">    <xsl:apply-templates select="/ns0:Root" />  </xsl:template>  <xsl:template match="/ns0:Root">    <xsl:variable name="var:v1" select="userCSharp:StringConcat(string(s0:Travel/DateTimeStart/text()) , &quot;  &quot; , string(s0:Travel/Field/text()))" />    <ns0:Root>      <xsl:value-of select="$var:v1" />    </ns0:Root>  </xsl:template>  <msxsl:script language="C#" implements-prefix="userCSharp"><![CDATA[public string StringConcat(string param0, string param1, string param2){   return param0 + param1 + param2;}]]></msxsl:script></xsl:stylesheet>
    Third, if you are really interested passing your whole using xslt, then probably this artical will be helpful to you
    http://connectedpawns.wordpress.com/2009/08/01/how-to-copy-the-entire-node-to-element-of-string-type-in-a-map/
    Please mark it as Answer if this answers your question
    Thanks.
    Mo
    The contents I write here is my personal views, not the view of my employer and anyone else.
    Thank you, yes you're right about the namespaces, but this is only a proof of concept ant I have to adjust it.
    What is the functoid you put in the map? And can I pass its output to an external assembly as parameter? (I need to do it and return the output to a certain schema node).
    Thank you

  • Clean install yosemite why are my var/db var/ usr/bin usr/lib files being transfered

    im doing a clean install and im wondering why /private/var/tmp, private/var/run, private/var/db, /Library preferences, are all being transfered to the new install?  plus they are all mounted like they are disks when you run diskutil list
    i tried looking it up but the only thing that comes up is server info...and this is home desktop computer

    EtreCheck version: 2.1.8 (121)
    Report generated February 10, 2015 at 3:26:50 AM CST
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Click for support] links for help with non-Apple products.
    Click the [Click for details] links for more information about that line.
    Hardware Information: ℹ️
        iMac (24-inch, Early 2009) (Verified)
        iMac - model: iMac9,1
        1 2.66 GHz Intel Core 2 Duo CPU: 2-core
        8 GB RAM Upgradeable
            BANK 0/DIMM0
                4 GB DDR3 1067 MHz ok
            BANK 1/DIMM0
                4 GB DDR3 1067 MHz ok
        Bluetooth: Old - Handoff/Airdrop2 not supported
        Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
        NVIDIA GeForce 9400 - VRAM: 256 MB
    System Software: ℹ️
        OS X 10.10.2 (14C109) - Time since boot: 1:38:8
    Disk Information: ℹ️
        Hitachi HDT721064SLA360 disk0 : (640.14 GB)
            EFI (disk0s1) <not mounted> : 210 MB
            Mac Yosemite (disk0s2) / : 639.28 GB (628.54 GB free)
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
        HL-DT-ST DVDRW  GA11N 
    USB Information: ℹ️
        Apple, Inc. Keyboard Hub
            Logitech USB Receiver
            Apple, Inc Apple Keyboard
        Apple Inc. Built-in iSight
        Apple Inc. BRCM2046 Hub
            Apple Inc. Bluetooth USB Host Controller
        Apple Computer, Inc. IR Receiver
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Problem System Launch Daemons: ℹ️
        [failed]    com.apple.ucupdate.plist
        [failed]    com.apple.watchdogd.plist [Click for details]
    User Login Items: ℹ️
        None
    Internet Plug-ins: ℹ️
        Default Browser: Version: 600 - SDK 10.10
        QuickTime Plugin: Version: 7.7.3
    3rd Party Preference Panes: ℹ️
        None
    Time Machine: ℹ️
        Time Machine not configured!
    Top Processes by CPU: ℹ️
            10%    taskgated
             7%    mdworker
             4%    launchd
             1%    WindowServer
             1%    ArpGuard
    Top Processes by Memory: ℹ️
        455 MB    softwareupdated
        163 MB    AntiVirus Sentinel Pro
        151 MB    WindowServer
        129 MB    com.apple.WebKit.WebContent
        129 MB    installd
    Virtual Memory Information: ℹ️
        3.02 GB    Free RAM
        2.92 GB    Active RAM
        1.62 GB    Inactive RAM
        764 MB    Wired RAM
        2.20 GB    Page-ins
        0 B    Page-outs
    Diagnostics Information: ℹ️
        Feb 10, 2015, 01:51:52 AM    /Library/Logs/DiagnosticReports/mbpluginhost_2015-02-10-015152_[redacted].crash
        Feb 10, 2015, 01:48:03 AM    Self test - passed
        Feb 9, 2015, 11:11:39 PM    /Library/Logs/DiagnosticReports/Setup Assistant_2015-02-09-231139_[redacted].cpu_resource.diag [Click for details]

  • XSLT Problem with soap namespace

    Hi there,
    I have a problem transforming an XML doc with soap elements, using XSLT (Xalan).
    Here's the input:
    <?xml version = "1.0" encoding = "ISO-8859-1"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.ean.nl">
      <testthis>123456</testthis>
    </soap:Envelope>and here's the XSL:
    <?xml version="1.0"?>
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" exclude-result-prefixes="soap">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="soap:Envelope">
    <Orders>
         <H01>
              <xsl:value-of select="testthis"/>
         </H01>
    </Orders>
    </xsl:template>
    </xsl:transform>I expect to get something like:
    <?xml version="1.0" encoding="UTF-8"?>
    <Orders>
    <H01>123456<H01>
    <Orders>But instead I get:
    <?xml version="1.0" encoding="UTF-8"?>
    <Orders>
    <H01/>
    </Orders>I've tried a lot of things and I'm probably overseeing something stupid, but I'm stuck.
    It seems as if anything without soap: namespace cannot be processed by my XSL (when I add it in the input XML and XSL it works).
    Any help would be greatly appreciated.
    Greetings,
    Erik

    Yes, I found it!
    The following XSL for the same XML doc works!
    <?xml version="1.0"?>
    <xsl:transform xmlns:ean="http://www.ean.nl" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" exclude-result-prefixes="soap">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="soap:Envelope">
    <Orders>
         <H01>
              <xsl:value-of select="ean:testthis"/>
         </H01>
    </Orders>
    </xsl:template>
    </xsl:transform>Thanks, you pointed me in the right direction :-)
    Erik

  • Styling XML with XSLT Problem with javax.xml.transform???

    I have been trying to make a transformation and seem to be having a problem in that javax.xml.transform can not be found while using jdk1.3....If I use jdk1.4, there is no problem....
    Does anyone know how I can get things to work using jdk1.3???
    (Description of what I am doing...1) Building XML Source 2) Setting up the XSLT File 3) Building Source Object 4) Build Result Object 5) Transforming the Data.....MY RESULT SHOULD BE AN HTML PAGE)
    I have tried putting xerces.jar and xalan.jar in my CLASSPATH....but this still doesn't work....onyl thing that has worked is using jdk1.4 as my JAVA_HOME....
    PLEASE HELP!!!!

    PLEASE HELP....your advice here would be greatly appreciated.....

Maybe you are looking for