pass xincludes without parsing - xslt-2.0

I've seen many question on resolving xinclude, but I haven't seen one about the opposite.
I have a source XML file with xincludes. I don't want to resolve them, but simply pass them through the XSLT with no changes. However, my parser is trying to resolve them. How can I get around this?
I'm using Saxon within Oxygen.

I found it. It's in Preferences under XML Parser in Oxygen.

Related

Why do people use i18n() and i18nc() instead of qsTr()?

I'm completely new to translating QML widgets.
I see people using i18n() and i18nc() in their source code.
I've found the commands documented here:
https://techbase.kde.org/Development/Tutorials/Localization/i18n#QML
But the QML documentation only lists the qsTr() method. I guess the other 2 commands are KDE specific?
Do I really have to dabble with those KDeclarative etc objects, in C++? I'm not really sure how that works. My widget doesn't use any of that, just qml files and some javascript files for external functions.
I've found out I can get the translation to work with PoEdit but only for .js files, if I define a custom source keyword (function name) to extract from them, but ONLY if they are i18n and i18nc (qsTr doesn't work) and when using a directory structure I stole from a working widget (that is /contents/locale/language_key/plasma_applet_widget_id.mo). Sadly, since the parser getText can't read qml files, this solution isn't good enough.
Now, I know qt provides a command, lupdate, to extract those keywords from the source, but that only works for qsTr, conversely. Trying to pass -tr-function-alias qsTr=(i18n) as an argument doesn't work. With qsTr() I can have a nice .ts file, but trying to convert that to po and use the previously mentioned trick doesn't work.
I wonder though, why the devs of the downloadable widgets all seem to use i18n and i18nc in their source code if lupdate doesn't seem to be able to extract those keywords.
Why do people use i18n and i18nc instead of qsTr?
Probably because it's way more convenient. I've been able to get .qml files to work using the above-mentioned trick by simply manually editing the .po files (referencing the qml file in question, the line where the keyword occurs and so on).

Creating MERGED file from ditamap and then filtering it

I'm a newbie in DITA OT and I am trying to get just the merged file from my ditamap and after upply xsl to it, but I dont need any other output.
I was thinking that I could use some part of the dita-ot source code that is doing merging or to make sort of "cutted" plugin that produces just the merged xml file and proccess xsl for it, and then gives the filtered xml file.
As I understood, there is a build.xml that is making this job using dost.jar, but I cannot configure, what exactly do I need to use from it. Or is it possible to create just merged file seperately, not starting the transformation, so I can use it for my later needs?
I am very appreciate for any help.
I created a special DITA OT plugin which can be integrated in the DITA OT and used to create just the merged document:
https://github.com/oxygenxml/dita-merged/tree/master/com.oxygenxml.merged
If you choose to publish to PDF and you set the parameter clean.temp to no, after the transformation is over you should obtain in the transformation temporary files directory a file called mapFileName_MERGED.xml which has all topic references expanded.

How to implement a swift code to generate xml file

well i've tried to do some code that can do a xml file in a "well done" way, I found this code https://gist.github.com/brentdax/caaaa134c500e00efd36
and i think is a good option to implement that i wish. but i can implementa that.
actually i implements but the error says: use of undeclared type NSXMLNode.
I tried to put it on source file, in a playgrouns on viewcontroller code file without success
I don`t know how can implement this.+
thanks in advice
If you want help fixing your code you need to show us that code.
Failing that, take a look at the NSXMLParser class. It's fairly easy to use.
EDIT:
This is a very old thread, but rmaddy pointed out that the question was about generating XML, and my solution of using NSXMLParser will parse XML, but not generate it.
I recently found a reference to the XMLParsing library, which apparently follows the conventions of the Codable protocol. I suggest using that.

Parsing XSD using Xerces

I need to parse a generic XSD and create sample XMLs conforming to the XSD. I am using Xerces for Java.
Does Xerces provide support for parsing XSD or do i have to parse it as a regular XML ? If theres support in Xerces, how do i do it?
Also could someone point to way/technique by which i can create all possible XMLs conforming to an XSD.
if possible please share code link or code snippet.
Thanks.
I am not sure which programming language you want to use but assuming Java, you can use XSOM or JaxMe to parse XSD's. You can extract the schema information and then generate the xml's based on the parsed meta data. Or check if XIG: Xml Instance Generator meets your requirement.

File name encoding at Knoppix

I am getting file list in my Java program using list() method of File class. When I run my program on Knoppix I get ???? instead of Cyrillic file names. It seems that problem is in knoppix, not java. I tried to use options for mounting file system, such as nls and iocharset, but it has no effect (or may be I use it in wrong way). Somebody can help me?
I think that problem is as you said with Knoppix. Probably you do not have Cyrillic font bundled, so there is no way to display these code points.
If you want to fix this, you will need fix distribution, as there is nothing wrong with the program. I am not sure if this is the question for https://serverfault.com/ or https://superuser.com/, but you can read their FAQ's and ask how to fix it there (probably you will need to re-create Knoppix distribution).

Resources