[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

2xml files -> one xml file and search question

Subject: 2xml files -> one xml file and search question
From: Michael Hoffmann <m-hoffmann@xxxxxx>
Date: Wed, 25 Oct 2000 13:48:15 +0200
search an xml file
ok i am sorry for not beeing precise enough...
to copy the 2 xml files and to show them isnt the problem..
my problem is to write a 3rd file ...
i mean are there any commands which write datas into a file ?
or do i have to use fp(write) for this ?
----------------------------------------------------------

ohh and another question...
i am trying to search a xml file for datas
example :
XML file :
<adress>
<name>name one</name>
<street>street one</street>
</adress>
<adress>
<name>name two</name>
<street>street two</street>
</adress>
<adress>
<name>name three</name>
<street>street three</street>
</adress>
<adress>
<name>name four</name>
<street>street four</street>
</adress>
....

XSL file :
...
<xsl:for-each select="adress[child::*=$search_text]">
	<xsl:value-of select="./adress"/>
	<xsl:value-of select="./street"/>
....

the varable search text is declared and i have no problems to search
either for name or for street
but how can i search for name + street ? (i have an inputfield and the
search_text i get via the browser
with <form action="sort.xml" method="get> and then <input type="submit"
/>. when i enter name and street it looks like 
http://.../my.xml?search_text=name+one+%2B+street+one      (thats what i
want so this is not the problem <g>)
and the variable search_text has the value "name+one+%2B+street+one" but
how can i make 2 strings of it
search_text1 (which contains name+one) and search_text2 (which contains
street+one) ?
somehow i should be able to search for %2B (which is +) and then extract
both strings and write them into different
 variables... anyone did sth like that before ? how can i do that ?

and the other problem is if my input isnt exactly the same thing as in
the xml file i dont get a result
(for example if my input would be just "name" or "Name" or "nam" then i
dont get any results.. how can i get all entrys which contains "name" or
"nam" then ? is sth like name* or nam* as input possible ?? how can i
tell this
to my <xsl:for-each select=""> or to <xsl:if test=""> ??)
can xsl(t) do this for me ? 

thx again

michael


Kay Michael wrote:
> 
> > my problem is, that i have 2 xml files with the same
> > structure but with
> > different datas inside
> > i can display both files but i cant save them as a different file...
> > can someone plz help me and show me how to combine those both
> > xml files and get a 3rd one with both datas inside ?
> >
> 
> <output>
> <xsl:copy-of select="document('document1.xml')/*/*"/>
> <xsl:copy-of select="document('document2.xml')/*/*"/>
> </output>
> 
> Mike Kay
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.