Re: Parse SQL Statement using XSL

Gregory,

this suggests you need an SQL parser written in XSLT...or how would  
you otherwise process and then pretty-print the SQL?

HTH,

Jan


On Nov 2, 2006, at 6:28 PM, Gregory Jungels wrote:

> I have an XML file that contains a SQL Statement inside one of the  
> tags.  I am using FO to ‘document’ this query XML file.  The  
> problem is, the SQL statement is not formatted very neat.  I would  
> like to break or parse it so the output would look something like:
>
>
>
> SELECT
>
>             A.COL1,
>
>             A.COL2,
>
>             A.COL3 as SOME_COLUMN,
>
>             B.COL1 as B_COL_1,
>
>             B.COL2 as B_COL_2
>
> FROM
>
>             FILE1 A
>
>             FILE2 B
>
> WHERE
>
>             A.COL1 = B.COL1     AND
>
>             A.COL2 = B.COL2
>
> ORDER BY SOME_COLUMN
>
>
>
>
>
>

Received on Thursday, 2 November 2006 19:36:37 UTC