how to replicate "WEB-INF/resources/apps/xbl/orbeon/us-state" - orbeon

I try replicate the example with file "zip-states.xpl" in diretory "WEB-INF\resources\apps\xforms-sandbox\services" and files directory /WEB-INF/resources/apps/xbl/orbeon/us-state.
In my case, the first file (zip-states.xpl),I changed the value from select="doc('/xbl/orbeon/us-state/states.xml')/states/state to select="doc('/xbl/orbeon/colombia/states.xml')/states/state.
After, I copied the files from "apps/xbl/orbeon/us-state" to "apps/xbl/orbeon/colombia", and change file name us-state.xbl to colombia.xbl
In file colombia.xbl, I changed value from "src="oxf:/xbl/orbeon/us-state/state.xml" to src="oxf:/xbl/orbeon/colombia/state.xml" and I go to the test form , but its not working.
I try created the same case, for change the value in state.xml for colombia states but in other file.
Please, I hope you can help me
Many thanks.

Related

Dynamically use current date in OUTPUT EXPORT filename

Stripped down example code using a static file name:
OUTPUT EXPORT /CONTENTS EXPORT=ALL /PDF DOCUMENTFILE='example.pdf'
My question is how to generate a datestamped file. I have tried using $DATE, '$DATE' and running it through a macro but can't seem to find the syntax.
Hey this is a really nice Idea for saving backups in a running syntax production - I will use this myself from now on :) .
So the following syntax works for me:
compute tdy= $time.
formats tdy (date11).
temporary.
select if $casenum=1.
write out="somepath\datemacro.sps" /"define !dated__filename () !quote(!concat('YOUR FILE NAME',' ','", tdy, "','.pdf')) !enddefine.".
exe.
Insert file ="somepath\datemacro.sps".
delete vars tdy.
The file name you used in the code above is now stored in a macro with the date added, and you can use it here:
OUTPUT EXPORT /CONTENTS EXPORT=ALL /PDF DOCUMENTFILE= !dated__filename .
Note that you can change "YOUR FILE NAME" into anything you like, including adding a path. And you can also change ".pdf" so save other kinds of files.
EDIT: Also of course change "somepath" to a valid path on your machine.

Module build failed (from ./node_modules/#ngtools/webpack/src/index.js):

I have created an application on angular 7 and ionic 4.
I tried to edit app.routing.ts file, setting path and component. From then on I am getting this error below:
ERROR in ./src/app/department/department.module.ts
[ng] Module build failed (from ./node_modules/#ngtools/webpack/src/index.js):
[ng] Error: ENOENT: no such file or directory, open 'C:\Users\x\department\department.module.ts'
[ng] at Object.openSync (fs.js:436:3)
[ng] at Object.readFileSync (fs.js:341:35)
[ng] at Storage.provideSync (C:\Users\x\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:98:13)
Make sure department component exist, check the templateUrl that corresponds to the file name you are referencing. You may have also modified the path unknowingly during modification of app.routing.ts file.
C:\Users\x\department\department.module.ts
This error occurs when your component can't be found with your app.module settings.
Follow these steps to solve your problem:
Check if the module.ts file exists.
Check the relative path.
The path is case sensitive (maybe the .ts file is Department).
Both answer are useful from #trustidkid and #vinay sharma. If there is someone has been facing the same problem;
1-Go to to the file that the error has occurred in. (To go directly to the file, click the error line shortly [CTRL+Click] (CMD+Click on MacOS):
ERROR in ./src/app/department/department.module.ts
Then check the path address if it is exactly true pointing the file. Most of these problems are having similar solutions. Just be sure about the path address of the file you want to point and the address mentioned in the other file which the error occurred.
This problem happens when you delete a component but forgot to delete its import from module.ts.
For example: TestComponent is deleted so you have to also delete:
import { TestComponent } from './test.component'
If you have a folder mapping on a windows machine like me, do not try to build it from a mapped folder, go to the original folder and build it from there.
Mapped Folder has a small icon like this:
In my case I had prime ng version that did not support a particular module, I simply commented it out and it worked.

Find Extensionless File in DOS For In Loop

I like to find all .js file (for example sss.js) and file without file type (the extension, the suffix, the file type after .dot)
I tried
for ..... In (*,*.js) ....
But not working, it will go through all files it found.
Please advice how to select the file that no filetype
You almost had it correct. You just need a dot after the first asterisk.
for ... in (*. *.js) ...

Zipping a folder

I am trying to use
TZipFile.ZipDirectoryContents()
Like so:
TZipFile.ZipDirectoryContents('Test.PCF', WorkingDir);
If I am reading this right, it should save the contents of folder "workingdir" into a file named Test.pcf.
Now when I do this I get error::
Raised exception class EFOpenError with message Cannot open file
...test.pcf. The process cannot access the file because its being used by another process."
Two things confuse me:
It says that it cannot open file. There is no test.pcf yet. I was hoping this would create it.
It says cannot access file. Is this because it's not created yet? Am I using this function wong? If so how would I create a zip file from a folder location?
I tested your code and it failed in the same way as you reported.
I then created an empty zip file manually by running WinZip.
Then ran your code and it ran fine.
It appears that the zip file has to already exist for ZipDirectoryContents to work.
To create a zip file programatically:
myZipFile := TZIpFile.Create;
myZipFile.Open('c:\myfolder\newzipfile.zip', TZipMode.zmWrite);
myZipFile.Close;
myZipFile.Free;
This line will then work:
TZipFile.ZipDirectoryContents('c:\myfolder\newzipfile.zip', WorkingDir);

Team Foundation Build Activitie "DownloadFiles" is giving error

I am customizing the default build process template in TFS 2010.
i am using "DownloadFiles" build activity and in server path i have given "$/TFS/Libraries/Foo.DLL", when i run the execute definition its throwing error as "Access to the path '\ServerName\SharedFolder\BuildName\TempFolder' is denied.".
But when i give server path as "$/TFS/Libraries" its downloading all the files in Libraries folder into shared TempFolder.
But i need do download only one file. Please help..
Thanks in advance..
Now, DownloadFiles does work for a whole folder only:
ServerPath="$/proj/path" - works great, all is downloaded to LocalPath.
ServerPath="$/proj/path/name.ext" - borked.
I've de-compiled DownloadFiles to see why: First it gets a list of server items, in our case just $/proj/path/name.ext. Then, it calculates the local path like this:
localItemPath = Path.Combine(LocalPath,VersionControlPath.MakeRelative(ServerItem, ServerPath));
In this line, the activity assumes that ServerPath is a path. If it's not, then MakeRelative will not recognize it, and the local path will be LocalPath/$/proj/path/name.ext, as the OP has observed.
Also, if ServerPath is not canonical - for example, $/proj/path/../path2, the same will happen. Solution: use VersionControlPath.GetFullPath(myNonCanonicalPath).
You need to grant the user running the build service with write permissions on the shared folder.
http://msdn.microsoft.com/en-us/library/cc668757.aspx
There are two separate Build activities, DownloadFiles for a folder ServerItem and a DownloadFile for a single file ServerItem.I'd expect it should work with DownloadFile.

Resources