Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attributes appended by default #3

Closed
rainerborene opened this issue Oct 6, 2009 · 1 comment
Closed

attributes appended by default #3

rainerborene opened this issue Oct 6, 2009 · 1 comment

Comments

@rainerborene
Copy link

Hello nick,

I have a question about this great tool. This utility appends the attributes title and value without any value by default?

Here is my template. Check out the result http://pastie.org/644087.

If the value wasn't defined it's not necessary to append these attributes, right?

Thanks in advance!

@nickdunn
Copy link
Owner

nickdunn commented Oct 6, 2009

If the value wasn't defined it's not necessary to append these attributes, right?

Right. Unfortunately I am using xsl:attribute-sets to add the generic sets of attributes that are common to all controls. When using attribute sets XSLT assumes that all attributes should always be added even when no value is specified. This is what the value and title attributes are added with blank values when you specify no value.

Originally I had separate xsl:call-templates for each attribute but this felt very messy and increased code size by many, many lines. Using attribute-sets is the most elegant solution since it is using a powerful feature of the XSLT language. But having the blank attributes is an unfortunate side effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants