# Include xsl template in .rxml file

**URL:** <https://www.ruby-forum.com/t/include-xsl-template-in-rxml-file/142103>\
**Category:** Rails\
**Created:** [July 3, 2008, 1:27pm UTC](https://www.ruby-forum.com/t/include-xsl-template-in-rxml-file/142103 "2008-07-03T13:27:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iain\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/6bbea6/32.png) [@Iain\_A](https://www.ruby-forum.com/u/Iain_A)\
**Post date:** [July 3, 2008, 1:27pm UTC](https://www.ruby-forum.com/t/include-xsl-template-in-rxml-file/142103/1 "2008-07-03T13:27:36Z")

</div>

Hello,

I have the following code:

xml.instruct! :xml, :version=\>“1.0”  
xml.instruct! ‘xml-stylesheet’, :href=\>’/stylesheets/java\_app.xsl’  
xml.blueman do  
xml.response do  
xml.code(@response.code)  
@response.url ||= “”  
xml.url(@response.url)  
@response.message ||= “”  
xml.message(@response.message)  
end  
end

But when this prints out its not including my xsl in the page.  
Actually I’m displaying this in an iframe. I hope that doesn’t matter.

Any ideas why this isn’t working. I thought the xml builder would have  
an easy link tag like javascript\_include\_tag etc etc, but can’t find  
one

---

<div class="post-metadata">

**Author:** ![Iain\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/6bbea6/32.png) [@Iain\_A](https://www.ruby-forum.com/u/Iain_A)\
**Post date:** [July 3, 2008, 6:45pm UTC](https://www.ruby-forum.com/t/include-xsl-template-in-rxml-file/142103/2 "2008-07-03T18:45:42Z")

</div>

Figured this one out in the end. I was missing one little bit. My  
java\_app.xsl is in a sub dir and I forgot to add text/xsl. These small  
things…

xml.instruct! ‘xml-stylesheet’, {:href=\>"/stylesheets/client/  
java\_app.xsl", :type =\> “text/xsl”}
