<br /> and <hr /> is getting changed to <br> and <hr>
Hi,
I have a few places where I have placed XHTML directly into my xslt macros. It all works fine except for places where I have put a <br /> tag. It needs to self close to stay compliant and for some reason it gets changed to <br> everytime once the content is put into the template. Is there any reason for this and any way I can fix it.
This is kind of what I was fearing. I honestly don't know too much of a difference between the two outputs but yes, changing the method to xml breaks the macro badly. I might just have to live with a page that doesn't validate. That won't kill me but I'd like to have that work if I can so I'll see what I can do.
<br /> and <hr /> is getting changed to <br> and <hr>
Hi,
I have a few places where I have placed XHTML directly into my xslt macros. It all works fine except for places where I have put a <br /> tag. It needs to self close to stay compliant and for some reason it gets changed to <br> everytime once the content is put into the template. Is there any reason for this and any way I can fix it.
Do you have
in your xslt? This seems to be the behaviour (it's producing html4). xslt 2.0 has output=xhtml but this doesn't help us much.
Will fix this issue, but I imagine you've chosen html for a reason.
Dan
If Dan's idea doesn't work, could you please try to use somethink like this:
Actually shouldn't be necessary, but this should work I think.
/Kim A
Hi Dan,
This is kind of what I was fearing. I honestly don't know too much of a difference between the two outputs but yes, changing the method to xml breaks the macro badly. I might just have to live with a page that doesn't validate. That won't kill me but I'd like to have that work if I can so I'll see what I can do.
Victory! Thanks a lot Kim.
I used this code and it works like a charm:
Thanks a lot, it finally validates.
Great to hear Andrew.
Glad I could help!
/Kim A
is working on a reply...