[xsl] attribute value replacement and good book recommendation.

Subject: [xsl] attribute value replacement and good book recommendation.
From: chun ji <cji_work@xxxxxxxxx>
Date: Fri, 7 Sep 2007 17:44:32 -0700 (PDT)
Hi there, 
I have couple of questions here. 

Q1.
I want to replace some attribute values in a xml file,
but I am kind  new to the XSLT and is blocked for what
I should do next. 

So here is my original xml file, old.xml,  

 
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=http://www.springframework.org/schema/beans  >

    <bean id="wandDataSource" class=""
destroy-method="close" scope="singleton">
        <property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
        <property name="url"
value="jdbc:oracle:thin:@www.boogle.com:1521:abcd"/>
        <property name="username"
value="someusername"/>
        <property name="password"
value="somepassword"/>
    </bean>
    
</beans>
 

I want to replace the username & password with the
value I give, for example, newuser & newpassword.
But that old.xml file is randomly generated, and I
dont know the value of username and password in
it, when these are being replaced. So in that case,
what this xsl template file should be looks like? 

Here is the target in my ANT script, that I used to
try to make that replacement. 
 
   <target name="updateXML">
      <xslt in="old.xml" out="new.xml"
style="update.xsl">
         <param name=user" expression=newuser"/>
         <param name="pwd" expression="newpassword "/>
     </xslt>
   </target>
  


Q2. 
I started to learn this kind of XML/XSLT tool almost 9
months ago, , but I still feel that there are lots of
things that I dont know.  Does someone know if there
are some good XML books in the market? Or some website
that can give a beginner very decent XML education?  I
think that would help me a lot. 


Thanks in advance.


Charlie. 



       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/

Current Thread