[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] how do indirection in value-of or select?
my xml is some database metadata that includes declarations of "domains" and "columns", among other things. "domains", for those not into rdbms-speak, are sort of like abstract types. each column has a domain, and each domain has its physical type. like this: <root> <domain name="email" dbtype="varchar2(100)"/> <domain ... /> ... <table name="mytable"> <column name="mycolumn" domain="email"/> </table> ... </root> now i'd like to produce an xsl style sheet that can print out something like this: create table mytable ( mycolumn varchar2(100); ); any suggestions? this obviously doesn't cut it: <xsl:for-each select="table"> create table <xsl:value-of select="@name"/> ( <xsl:for-each select="column"> <xsl:value-of select="@name"/> <xsl:value-of select="@domain"> <!-- do what here? --> </xsl:for-each> </xsl:for-each> this doesn't work either for the tricky line: <xsl:apply-templates select="ancestor(root)/domain=@domain"/> i'm willing to change the syntax of the xml if that helps, but it does seem like xsl should have some way to do this. macros? constants? producing elements that are then processed again by the processor? or can xsl just not do a join? -mda 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
|