Subject: [xsl] re: generation of qnames/prefixes in content and value [was xbind:module....] From: "Curt Arnold" <carnold@xxxxxxxxxxxxxx> Date: Sat, 3 Mar 2001 11:43:50 -0600 |
From: "Clark C. Evans" <cce@xxxxxxxxxxxxxx> > Can we get into esoterics here? Just a wee bit ago, on the xml-dev > list, Curt Arnold stated that the inability to assign specific > prefixes in XSLT would prevent usage of an implements-prefix > within SVG's script element. I scanned the 1.1 WD and did not > see where the new specification has addressed this difficulty. > > Without the ability to specify prefixes, then an XSLT stylesheet > which generates an XSLT stylesheet will be unable to declare > script items. Right? Or am I missing something again? Actually, as far I can tell, it would also prevent the generation of any XML application that used qualified names in contexts other than tag or attribute names. For example, XML Schema uses attribute values containing QNames to refer to types or elements defined in other schemas (for example, base="xsd:double") and XSLT 1.1 uses QNames to refer to extension behavior in expressions (i.e. ="{date:format(@date)}" I don't think that you want to suggest being able to control the prefixing, but you would want a way to generate an appropriate QName given a URI and local-name. My initial thought was that you could have something like format-qname(uri,localname), however since you might want to use a format-qname deep inside text content that might introduce a new namespace without a place to put an "xml:prefix" attribute. I guess you could do something like: <xsl:prefix variable="datePrefix" namespace="http://www.example.com/date-format"/> <alias:script implements-prefix="{$datePrefix}" type="application/java-archive" src="jar:http://www.example.com/date-format.jar!/com/example/date-format.cla ss"/> <alias:value-of select="{concat(concat($datePrefix,':'),'format(@date)'}"/> xsl:prefix would have the same type of placement restrictions as xsl:attribute, that is it could not appear after you have started adding content to an element. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xbind:module == xsl:scrip, Clark C. Evans | Thread | Re: [xsl] re: generation of qnames/, Steve Muench |
[xsl] XSL2HTML & Javascript, Archon Giorgos | Date | Re: [xsl] XSL2HTML & Javascript, Robert Koberg |
Month |