You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Philippe Vijghen <Ph...@forem.be> on 2000/08/10 11:54:38 UTC

Extensions element with AVT-like attributes

Dear all,

I would like to define some extension element
to which I could pass attributes that are defined
according to X-Path expressions or XSLT variables.

I was thiking about using somthing like the AVT
(Attribute Value Template) mechanism.

For example, based on the sample "3numlistJava" bundled in Xalan
I would expect the following to work as well in my XSL:

	<counter:init name="{$varName}" value="{/RootElem/@counter}"/>

However, the Java code for implementing the element extensions, does the
following for getting the name and the value

>  public void init(org.apache.xalan.xslt.XSLProcessorContext context,
>                   org.apache.xalan.xslt.ElemExtensionCall extElem)
>  {
>    String name = extElem.getAttribute("name");
>    String value = extElem.getAttribute("value");
>    ...

...which means that the attributes are not parsed as I would like to. :(

Could anybody of you help me setting up some code that would allow
me to process attribute values as for an AVT?

(I guess/hope they is stuff in Xalan to be re-used for doing that.)

Thanks in advance,

	Philippe
---
Philippe Vijghen  phv@acse.be
Project Manager   +32 (2) 705.70.21
ACSE s.a.         Bd Général Wahis 29. B-1030 Bruxelles. Belgium