1
Ruby/NokogiriがXSLT内で外部関数の使用を実装しているかどうか知りたいです。Ruby/Nokogiri XSLT変換と外部関数
「はい」の場合、構文は何ですか?
<xsl:stylesheet xmlns:my="http://example.com/functions" extension-element-prefixes="my">
あなたはその後、使用することができます:ルート要素にこれを追加することを忘れないでください、XSLTファイルで
myfuncs = Class.new do
def func1(a, b)
# do processing here
end
end
Nokogiri::XSLT.register "http://example.com/functions", myfuncs
:
ようこそStackoverflow。 http://stackoverflow.com/questions/how-to-askを読んでみてください。 –