Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send "defer" attribute while creating HTML via XSLT?

I need to do XML to HTML transformation via XSLT. I have a constant like:

<script type="text/javascript" src="source.js" defer></script>

Oxygen Editor throws error "Attribute name "defer" associated with an element type "script" must be followed by the ' = ' character." and doesn't allow to do transformation without modifying or deleting the attribute.

How can I save "defer" for transformation? Whould it be correct to do like this:

<script type="text/javascript" src="source.js" defer="1"></script>

?

like image 523
Андрій Бойко Avatar asked Oct 26 '25 15:10

Андрій Бойко


1 Answers

I've tried to assign different values to "defer" ("", "1", "defer", "$dollar") and in any case script works. So assigning any value to "defer" works.

like image 52
Андрій Бойко Avatar answered Oct 29 '25 07:10

Андрій Бойко