Need to store <?fo:page-number?> inside a variable - bi-publisher

I need to print a qrcode that is a concat by a code that is stored in the xml tag and the actual page number, because I need to pass the string with xmltag and page number in the <?format-barcode:DATATEXT;'qrcode';'MyBarcodeEncoder'?> but i can't figure out how to do that.
I tried to store the <?fo:page-number?> inside a variable and then concatenate that with my xmltag code but i think it's impossible.
Anyone knows some workaround to do that?
thanks

Related

MediaWiki: How can I use the output of {{Special:Editcount/User}} in #expr?

I want to use the output of {{Special:Editcount/User}} in #expr to calculate something. But of course the output is handled as a string, even if I split it into its figures with #sub. So how can I make it being recognized as int? Any idea?
Try {{formatnum|{{Special:Editcount/<user>}}|R}} (docs).
You cannot do that, because embedded special pages such as {{Special:Editcount}} are filled out at load time, after the Wikitext has already been parsed. In order to parse such content you will need runtime JavaScript.

How can I take this text and store it in a variable?

I'm not sure if I can accomplish this with Lua, but I want to take the data from the following URL:
http://www.roblox.com/Trade/InventoryHandler.ashx?token=%22&filter=0&userid=1210210&page=1&itemsPerPage=14&_=
and store it in a variable so I can manipulate it.
Is there any way I can do this?
To save a string as a variable it is as simple as
foo = "contents of string"
To manipulate the string, you would use the string library
If you want the text at the URL instead of in the url, see the link to the previously asked question I added in the comments

Problems getting data from XML using Nokogiri and Rails

I'm trying to get information from a XML file with Nokogiri. I can retrieve file using
f = File.open("/my/path/file.xml")
cac=Nokogiri::XML(f)
And what a get is a fancy noko:file. My row tags are defined like
<z:row ...info..../>
like
<Nokogiri::XML::Element:0x217e7b8 name="z:row" attributes=[#<Nokogiri::XML::Attr:0x217e754 name="ID_Poblacio" value="3">
and I cannot retrieve the rows using either:
s=cac.at_xpath("/*/z:row") or
s=cac.at_xpath("//z:row") or
s=cac.at_xpath("//row") or
s=cac.at_xpath("z:row")...
Probably I'm really fool but I cannot figure out which can be the issue.
Does anyone face this problem?
Thanks in advance.
P:S I tried to paste my cac file directly from bash but something wierd happens with format so I remove it from question. If anyone can explain how to do it I will appreciate it.
Your XML element name contains a colon, but it is not in a namespace (otherwise the prefix and uri would show up in the dump of the node). Using element names with colons without using namespaces is valid, but can cause problems (like this case) so generally should be avoided. Your best solution, if possible, would be to either rename the elements in your xml to avoid the : character, or to properly use namespaces in your documents.
If you can’t do that, then you’ll need to be able to select such element names using XPath. A colon in the element name part of an XPath node test is always taken to indicate a namespace. This means you can’t directly specify a name with a colon that isn’t in a namespace. A way around this is to select all nodes and use an XPath function in a predicate to refine the selection to only those nodes you’re after. You can use a colon in an argument to name() and it won’t be interpreted as a namespace separator:
s=cac.at_xpath("//*[name()='z:row']")

Encrypt Get-Parameter(URL) Tomcat/Servlet

is there a possibility to encrypt or just don't display the Get Parameters in the Internetbrowser when im using JavaServlets on Tomcat?
that means for example: localhost/main?id=3
should be displayed like this: localhost/main or localhost/main?6puu4YjzScxHsv9t....
Is there a simple and fast solution? Does this make sense?
Thx for your tips..
You could use POST instead of GET on your HTML form. This will turn localhost/main?id=3 into localhost/main. The parameter id will still be passed and you should be able to retrieve its value in the same way, on the server-side.

How can I retrieve an id from the url in Coldfusion?

I'm updating a site and am struggling to find a way to get an id from the URL. For example I have this:
http://some.html/search.cfm?id=9900000000301
How do I get the id value "9900000000301" from the URL in Coldfusion8?
I have tried url.id plus all sorts of *cgi.query_string* variations, but the number is still out of reach :-(
Thanks for help!
EDIT:
If I dump the URL struct, I'm getting this:
catch - struct
TYPE: default
VALUE: search
Which is not saying much to me.
The url.id should work just fine.
Url.Id will work - with one exception.
If you have created a variable called Url, it is possible (in Adobe CF) to "hide" the Url scope, and thus not be able to access it.
For example, if you have a function with an argument called url, referring to url inside that function will refer to Arguments.Url, not the Url scope. If this is the case, you need to rename the argument to be able to access the proper Url scope.
(Alternatively, switch to a better CFML engine where scope names always takes precedence over unscoped variables, and thus scopes cannot be hidden.)
Depending on how you are looking to use the data, here are two examples. The first checks to see if it was defined and the second sets a variable to the value.
<cfif isDefined("URL.id")>
<cset myVariable = URL.id>
</cfif>
Hope this helps!

Resources