Hi Alistair & Scott,

I have still not got the solution for the problem.
1. Actually I am prepraring a XML file after selecting the name of the table 
and field
dynamically.something like this
<DATAMAP>
<MAPPING>
<ROOTELEMENT>Customer_id</ROOTELEMENT>
<tablename>
HP_CUSTOMER_ID_MAP
</tablename>
<fldname>
OS_CRM_EXCHANGE_CUSTOMER_ID
</fldname>
</MAPPING>
</DATAMAP>

2.After that there will be a Style sheet which will transform with this xml 
file to get
another style sheet.The first style sheet will look something like (not sure 
about the
syntax
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
<xsl:output method="XML"/>
<xsl:template match="ROOTELEMENT">
  <SQL>select <xsl:value-of select="tablename"/>.<xsl:value-of 
select="/fldname"/>
from<xsl:value-of select="tablename"/> </SQL>
</xsl:template>
</xsl:stylesheet>

3.So I should get another style sheet in out put something like
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
<xsl:output method="XML"/>
<xsl:template match="ROOTELEMENT">
  <SQL>select  customer.customer_id from customer </SQL>
</xsl:template>
</xsl:stylesheet>

and againg this xsl sheet should be transformed with a xml file.If I get the 
output
something like in step 3 then I can further transform it.

Is it posiible to do this.

Thanks and Regards

Savita.

Alistair Hopkins wrote:

> Yes, you can definitely do this: I know just what you mean.  Not exactly
> sure how...
>
> You want meta-templating:
>
> <xsl:template match="customer-id">
>   <xsl:for-each select="fieldname">
>         &lt;xsl:value-of select={.}/>
>   </xsl:for-each>
> </xsl:template>
>
> may work, OR try some namespace trickery:
> use the xsl: namespace qualifier in your metatemplate, then declare in the
> generated stylesheet that the default namespace is xsl: or vice versa: that
> should do it.
>
> <xsl:template match="customer-id">
>   <xsl:for-each select="fieldname">
>         <value-of select={.}/>  --this won't be processed by Xalan in 
> preprocessing
>   </xsl:for-each>
> </xsl:template>
>
> hth,
>
> Al
>
> -----Original Message-----
> From: Scott Vachalek [mailto:[EMAIL PROTECTED]
> Sent: 08 May 2002 21:26
> To: [EMAIL PROTECTED]
> Subject: Re: Transformation of XML file
>
> Hmm, I'm still not sure what you mean when you say you want an XSL output
> file.  I'm going to assume FO, but XSLT is pretty easy to adapt to any kind
> of output.  For this you want to use Xalan (also from Apache) rather than
> Xerces.  If you write an XSLT like this:
>
> <xsl:template match="customer-id">
>   <fo:block><xsl:value-of select="tablename/fieldname"></fo:block>
> </xsl:template>
>
> you can extract all the "fieldname" text into a new document (in this case,
> inside XSL-FO "block" tags).
>
> ----- Original Message -----
> From: "Savita" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, May 07, 2002 11:39 PM
> Subject: Re: Transformation of XML file
>
> > Hi Scott,
> >
> > I have a XML file.with come tags like
> > <customer_id><tablename><fieldname></fieldname></tablename></customerid>
> >
> > Now I have to prepare a xsl file with some select statement like select
> <xsl
> > value of: tablename,fieldname >from some table .
> >
> > and I have to get a XSL file where all the values will be replaced from
> the xml
> > file .
> >
> > Is it possible to do this pleas let me know .
> >
> > Thanks and Regards
> >
> > Savita
> >
> >
> > Scott Vachalek wrote:
> >
> > > Can you explain what you are trying to do in a little more detail?  XSLT
> > > converts an XML document into any almost any sort of text, so it's
> possible,
> > > but I don't understand exactly what you mean--you want to create a new
> XSLT
> > > document, or you want to create a FO file (FO is sometimes also called
> XSL)?
> > >
> > > ----- Original Message -----
> > > From: "Savita" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, May 07, 2002 5:08 AM
> > > Subject: Transformation of XML file
> > >
> > > > Hi,
> > > >
> > > > Is it possible to transform a xml-file and a xsl file and get the
> output
> > > as an
> > > > xsl file.I am getting output as a document and a string.
> > > >
> > > > If it is possible to transform a xml file and a xsl file and get a xsl
> > > file in
> > > > output please let me know how to do this .
> > > >
> > > > Any help would be highly appreciated.
> > > >
> > > > Thanks and Regards
> > > >
> > > > Savita.
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/2002
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/2002
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to