Jump to content

Break Strings (sub-strings)


Recommended Posts

Hello, i have a question and hope some on can help me :-) .

I have 2 XML files and 1 XSL Transformation. I will show you an example.

First one is empty and i want to fill it:

<Cars>      <vehicle1>                <text></text>                <attribute>                             <attributeOne atr1="no"></attributeOne>                             <attributeOne atr1="no"></attributeOne>                </attribute>      </vehicle1>      <vehicle2>               <text></text>               <attribute>                            <attributeOne atr1="no"></attributeOne>                            <attributeOne atr1="no"></attributeOne>               </attribute>     </vehicle2></Cars>

Second one is an export from a Programm with the information i need:

<Information>             <vehicle1 information="Corvette 1,2"></vehicle1111>             <vehicle2 information="Opel 1 Cadett"></vehicle1111></Information>

now i want to fill the xml file 1 with the information.

Normally i can use xsl:value-of select=".."

But The Problem is

with the Information information="Opel 1 Cadett"The output in the first fiel should be<text>Opel Cadett</text><attribute>           <attributeOne atr1="yes"></attributeOne>           <attributeOne atr1="no"></attributeOne></attribute>

I tired to use sub-string but nothing worked :sorry:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...