Page 1 of 1

copying files from sharepoint

Posted: Sat Mar 04, 2023 11:18 pm
by sljohns
I have a custom framework for a nonDITA document. The custom framework publishes the xml file to pdf using an xslt transformation. This works perfectly when transformed from a local dir. However, when running the same transform from a file that is in sharepoint, any resources external to the source xml file (for example images) are missing from the output pdf.
When transforming to an fo file, the reference to the image file is present, but the image file itself is not there.
So I created an ANT transform to copy the appropriate resources. However, I cannot find the correct variable to get the appropriate sharepoint path so that all the files and folders from the current file location (sharepoint) are in the appropriate "\\AppData\Local\Temp\OxygenXMLTemp\...". Any help would be appreciated.

Re: copying files from sharepoint

Posted: Mon Mar 06, 2023 9:08 am
by Radu
Hi,

Are you connecting using Sharepoint online or the older Sharepoint connector?
https://www.oxygenxml.com/doc/versions/ ... ction.html
When transforming to an fo file, the reference to the image file is present, but the image file itself is not there.
So the XML file is on Sharepoint, the intermediary XSL-FO file will be on the local disk meaning that it should be created so that it has absolute URL references to the other image resources from Sharepoint. But this might not work as Sharepoint is not a plain web site, it has various authentication details which need to be filled out in order to access resources from it.
So I created an ANT transform to copy the appropriate resources. However, I cannot find the correct variable to get the appropriate sharepoint path so that all the files and folders from the current file location (sharepoint) are in the appropriate "\\AppData\Local\Temp\OxygenXMLTemp\...". Any help would be appreciated.
I'm not sure how that could work. Sometimes there are ANT tasks to connect ANT build files for example to FTP servers: https://ant.apache.org/manual/Tasks/ftp.html
But I do not know of an ANT task for connecting to a Sharepoint site.

How about if you map the Sharepoint site to a local disk drive so that Oxygen considers it's just a local folder?
Regards,
Radu

Re: copying files from sharepoint

Posted: Thu Apr 18, 2024 5:39 pm
by Garrett_3
sljohns – Did you figure out a solution to this? I would love to use SharePoint as a CMS, but there's no point if you can't publish files because of it.

Radu – Would it be possible to "save a copy" of your XML to a temp directory in the transformation scenario somehow?

Garrett

Re: copying files from sharepoint

Posted: Fri May 24, 2024 1:23 pm
by im_rem
Garrett_3 wrote: Thu Apr 18, 2024 5:39 pm Radu – Would it be possible to "save a copy" of your XML to a temp directory in the transformation scenario somehow?
Garrett
I would also like to suggest it as a new feature. We use Sharepoint mostly for files coming from product managers and developers, while the DITA documentation is managed in a GIT repo. But there are some files that developers would like to share in the Internal Knowledge Base. So for this such a feature would be handy.
As an alternative, I will ask ChatGPT to write me a script that downloads required files weekly into a subfolder in my DITA project folder.

Re: copying files from sharepoint

Posted: Sat May 25, 2024 12:21 pm
by Radu
Hi,
Not sure how I can help here. Maybe you can search for some sort of Sharepoint/Git integration or as you said, have a script which updates the Git project daily with the contents from Sharepoint. Ideally the publishing engine should have all necessary resources available on the local disk.
Regards,
Radu

Re: copying files from sharepoint

Posted: Wed Apr 16, 2025 9:56 pm
by sljohns
sorry garrett_3 for the long delay. instead of working with the file directly in sharepoint, i open the same file from the local sharepoint sync folder and my ant transform works as designed