I think the problem is you are rendering a semicolon after the & sign
It should output to …co/ImageGen.ashx?image=/media/4668/forside.png&width=350&constrain=true" /> instead of …co/ImageGen.ashx?image=/media/4668/forside.png &;width=350 &;constrain=true" />
That being said, I personally would favor using a generic macro to insert images instead of inline XSLT. I normally create a macro called "Insert Image" that accepts fields like the field's alias, width, height, constrain, etc. I think it's a bit cleaner than inline XSLT, you have more control, and you can re-use it easily.
The semicolon I actually added because the validator choked on the w in witdth. So just for the sake of trying I added the semicolon and it worked well. So apparently w3c accepts this as valid markup. However I'm aware that's not how it's normally done.
And I have to agree with you on the macro issue. I use macro as well and they certainly are easy to handle and they validate :-)
I would just like for the inline solution to validate also because I often use inline getmedia as an 'qiuck'n dirty' way to present pictures instead of copying-up a macro.
inline getmedia works..BUT does not validate against w3c - & issue
Hi all,
This puzzles my mind. Like the header says the inline xslt functions but it does not validate.
heres the inline:
The problem is with this part: &;width=350 &;
The error I receive upon validating is:
…co/ImageGen.ashx?image=/media/4668/forside.png &;width=350 &;constrain=true" />
…co/ImageGen.ashx?image=/media/4668/forside.png &;width=350 &;constrain=true" />
Can anyone tell what's wrong. I typed the & as & as ssen in the code up top. So what's up with this inline xslt stuff :-)
Hi,
I think the problem is you are rendering a semicolon after the & sign
It should output to …co/ImageGen.ashx?image=/media/4668/forside.png&width=350&constrain=true" /> instead of …co/ImageGen.ashx?image=/media/4668/forside.png &;width=350 &;constrain=true" />
Try changing your inline XSLT to:
I think that should work.
That being said, I personally would favor using a generic macro to insert images instead of inline XSLT. I normally create a macro called "Insert Image" that accepts fields like the field's alias, width, height, constrain, etc. I think it's a bit cleaner than inline XSLT, you have more control, and you can re-use it easily.
-Tom
Hi Tom,
Thanks for replying :-)
The semicolon I actually added because the validator choked on the w in witdth. So just for the sake of trying I added the semicolon and it worked well. So apparently w3c accepts this as valid markup. However I'm aware that's not how it's normally done.
And I have to agree with you on the macro issue. I use macro as well and they certainly are easy to handle and they validate :-)
I would just like for the inline solution to validate also because I often use inline getmedia as an 'qiuck'n dirty' way to present pictures instead of copying-up a macro.
Solved it by skipping the inline xslt and creating a macro instead
is working on a reply...