From: niklas | brueckenschlaeger Date: 2010-11-29T23:17:35+09:00 Subject: Re: Add XSL stylesheet using Nokogiri --=-MMvOvQzFyijjlhY19+wt Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Great. Thank you. I didn't know that. On Mon, 2010-11-29 at 22:57 +0900, Mike Dalessio wrote: > On Thu, Nov 25, 2010 at 3:09 PM, niklas | brueckenschlaeger < > niklas@brueckenschlaeger.de> wrote: >=20 > > > > http://stackoverflow.com/questions/3166544/associate-an-xml-stylesheet-= with-an-xml-document-with-nokogiri >=20 >=20 > OMG, there is so much fail here, I don't know where to start. >=20 > Instead, I will simply submit the correct method without further comment: >=20 > require "nokogiri" >=20 > doc =3D Nokogiri::XML "foo" > doc.root.add_previous_sibling Nokogiri::XML::ProcessingInstruction.new(do= c, > "xml-stylesheet", 'type=3D"text/xsl" href=3D"foo.xsl"') > puts doc.to_xml > # =3D> > # > # foo >=20 >=20 >=20 >=20 > > > > > > On Fri, 2010-11-26 at 05:05 +0900, Hagbard Celine wrote: > > > Hi there. > > > > > > I am generating a XML file using Nokogiri. I would like to add a XSL > > > stylesheet reference to the document. By XSL stylesheet reference I m= ean > > > > > > > > > > > > I haven't found a way to do this with Nokogiri. Does anyone know a > > > solution to my problem? Any help is appreciated. > > > > > > > --=-MMvOvQzFyijjlhY19+wt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJM87X4AAoJEIQdQGZOjo824WIP/2uPckmi6qA+BK29EjDJi7To bGe3HA8A5DebFvfiawwHboAonv2rVCS9wSqbn/RafudZTyLK3xL2D81fluO5UNLJ U4MEU7P4LInZVagrlca+gW77K63oc+hoWU6G7L50K+fNIXUiDM1H/BaiY4JNptR6 QxiDpZB+wh3fEDD0jExfcfB/wk3i9d6cJBtTQNS1mN3oJk8KfKdTv7kLdtH2sO68 6yPdDa4s1g7Q7wgtl9Hm/1lKVJ6jzi1fQHCpqa/91zggV4pDhkrg5nNh+8vyJVJx AEIuJ0q36JBAtr64cYaGHuIcCeVDOYONOVQfGEHSEs8T9SC/7p3dQB4zffoGyLOL UtPHHcDNMWbe8/XRrUvRUG05DDRqmz+mzx1K749shC22YeoYpZV0/MvY06Ta1cZO X9ATEqP+ymr+rlOB3kD60OxQFjcGD/1pmoErc49FdjFlg+Uor6dMAh7pjEsV8auB 2mAl13x4nsfc5PqVSv4eS2HBsmHHp9VwA+wNFu1YoJUy1+Ud/bD5QLokRBdTGX32 X/puhCgUxyXvgdt9LATH3dqgv0W2o70D/ozH64rKjf7Q9QyLYuz1ZTWiE31adEQQ EiuzMP3p2Et0jjlxPcSwILkbir7DJ3MoSpazUF/lfdfjj6uuMp/7DM9QkkMfDJj7 TwqK2r8rbwh3/TORhlTk =SWSE -----END PGP SIGNATURE----- --=-MMvOvQzFyijjlhY19+wt--