Subject: RE: [xsl] Dynamically setting namespace prefix From: "Hofman, Peter" <peter.hofman@xxxxxxxxxxxxx> Date: Fri, 8 Jun 2007 09:14:17 +0200 |
Thanx. Wow, learned something new again today :-) This will cleanup my style-sheet tremendously. Thinking about that, another question pops up: Are there any pitfalls in the application of AVT? Peter -----Original Message----- From: Michael Kay [mailto:mike@xxxxxxxxxxxx] Sent: donderdag 7 juni 2007 15:26 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Dynamically setting namespace prefix The name attribute of xsl:namespace (like other similar instructions, e.g. xsl:element and xsl:attribute) is an AVT, so you can do <xsl:namespace name="{$var}">...</xsl:namespace> Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Hofman, Peter [mailto:peter.hofman@xxxxxxxxxxxxx] > Sent: 07 June 2007 14:05 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Dynamically setting namespace prefix > > Hi all, > > I am trying to generate schemas from some XML source, using XSLT 2.0 > (Saxon 8.9 B). > > During the generation I have to dynamically add imports of several > other schemas, of which the namespace is composed during processing. > > However, I need to add those namespaces to the schema element, in > order to have references to the imported schemas work. > > How can I dynamically set the prefix of a namespace, if I do not know > how many there will be. Using a variable in xsl:namespace like > <xsl:namespace name="$some_variable" .../> fails. > > Regards, > Peter > > > This e-mail and any attachment is for authorised use by the intended > recipient(s) only. It may contain proprietary material, confidential > information and/or be subject to legal privilege. It should not be > copied, disclosed to, retained or used by, any other party. If you are > not an intended recipient then please promptly delete this e-mail and > any attachment and all copies and inform the sender. Thank you.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Dynamically setting names, Michael Kay | Thread | [xsl] Find an xml node from a sessi, Mike |
[xsl] Indesign table to HTML table, e107lac | Date | Re: [xsl] Indesign table to HTML ta, Jeff Sese |
Month |