2xml files -> one xml file and search question
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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format