From: Christian Neukirchen Date: 2005-09-02T02:25:42+09:00 Subject: Re: Builder Question Keith Fahlgren writes: > Hey, > > I'm trying to have Builder help me turn some YAML into XSLT that does > search and replace. I've gotten most of it down (and working a helluva > lot faster than YAML->XML->XSLT->XSLT...) but am struggling with a > couple of issues. Everybody will probably tell me to use a different > XML writer, and that's ok, I guess... Following code is untested, and just from the source: > The documentation says I can declare a namespace like this: > xml.SOAP :Envelope > > How do I combine that with attributes? I'd like to do this, but it > doesn't work: > xml.xsl :variable ("name"=>"cats") # and this in different orders > > Nor does: > xml.tag!("xsl:variable" "name"=>"cats") # and this with different > grouping Did you try xml.xsl :variable, "name" => "cats" ? > Also, is there any way to make elements with a '-' in the name, as in > ? > This doesn't work: > xml.apply-templates xml.tag! "apply-templates" > In summary, is there a way to make this? > > > ... > xml.xsl :stylesheet, "version" => "1.0" do xml.xsl "apply-templates", "select" => "cats" do ... end end (I hope that works. :-)) > Many thanks, > Keith -- Christian Neukirchen http://chneukirchen.org