MarkLogic WebDav documents created as binary instead of xml - webdav

I am trying to create a dynamic website using MarkLogic and xQuery as the server side language.
I have created a WebDav server and am using windows explorer to create xml documents within the database, the contents of which are used as some pages content.
When I create xml documents in windows explorer, MarkLogic inserts them as binary documents instead of xml documents, therefore my xquery does not work. Is there any way I can change this, ie a setting within MarkLogic?
If I do xdmp:document-insert("/example.xml", <a/>) from within cq it does create an xml document.
Many thanks.

Check the mimetypes in the admin console: http://docs.marklogic.com/guide/ingestion/formats has more on that subject.

Related

Alfresco Repo Side working on Document Upload

I would like to understand how does the Alfresco Repo works whenever any document is uploaded. How exactly the content is stored in file system metadata in DB and indexes in Solr respectively ?
You have to dive deep down in Alfresco documentation and code as well for getting all these clarifications.
Alfresco stores the documents in the physical directories in proper folder structures(which you can define in your code as well). CMIS services expose the functionalities for all operations which you can perform on documents. CMIS internally uses cache in CMIS session for better performance.
Documents metadata and node references all are being stored in DB(PostgreSQL) and indexing of documents are being done automatically through Solr in latest versions.
You have to specify the fields which you want in Solr document for indexing. Searching documents in Solr is faster than DB but queryConsistency is Eventual for Solr. So, as per your use case you have to decide whether query Solr or DB.
So, whenever any operation(CRUD) on any document is being done, it reflects in DB first then async indexing of that document happens in Solr. This Async indexing leads to Eventual consistency.

Word VBA / Macro run on server Application.Run, ASP.NET, DCOM

I am not a coder but need a task done.
We have a website that builds a word doc file using ckeditor based on answers from clients.
This documents needs afterwards to be formatted (TA/TC functions of word) which cannot be done with ckeditor.
Therefore we have a VBA/ macro that needs to be run in MS word after the doc file is generated.
I want to automate this step and have the VBA/macro run, before the doc is send to client.
So from my understanding, you have to take the CKeditor doc, run the macro on the server, and store it in the current database..
Possible or not?
This should not be done server-side. Working with Office applications server-side is not supported - Office applications are end-user applications. They can easily appear to "hang" when used, due to waiting for user input.
More information about using Office on a server can be found here
Possible: theoretically, yes, but impossible for anyone to guarantee as the code and document content are unknown. But, theoretically, if it works on a desktop it can work when run on a server.
The more "correct" way to manipulate Office documents on a server is to work directly with the Office Open XML files, instead of opening them in the application interface. The file formats were designed for this scenario and execution is also much faster. I'm guessing, however, since TC and TA fields are mentioned that the macro also builds TOCs? If yes, then the document would also have to be opened in order to generate the TOC (update the field). Server-side, that would mean using Word Automation Services, which is part of SharePoint.

Want to desing a Local search engine

I want to make a local search engine, Through which we can search locally.
I have the document like Main Category,Sub Category,Details about the product etc.
It works like the Justdial.com Or amlooking4.com.
So,Any one suggest any code or any reference link then it will be helpful for me.
I want to to work on this in .net environment & SQL Server database.
Assuming you already have your database where you need to perform the search, you can consider using the built-in full text search in the SQL Server. See:
http://blog.sqlauthority.com/2008/09/05/sql-server-creating-full-text-catalog-and-index/

Display doc file in browser using asp.net

I am developing a job portal using asp.net. I need to build a control to display the uploaded resume on the browser from the server directory. Could any one share the code to do the same. what is the control appropriate to display the content of a doc file?
Thanks in advance.
There is no ASP.NET server control to display a Word document in a web-page. Microsoft removed the Internet Explorer-only ability to show Word documents in the browser with Office 2007, but before then you could have gotten away with doing it in an <iframe> - note that this does require Word to be installed on the browser's computer.
It sounds like you want to convert the Word document into HTML+CSS. I'll stop you right here, because that is a non-trivial operation, even with the significantly-easier-to-process OOXML file formats. There are commercial libraries that can assist you with this, but they cost $lots. (Bing for "Aspose").
There are a few other alternatives:
Print the document, server-side, to a PDF file. This needs a complicated set-up on the server as the Office COM automation libraries should not be used from headless (e.g. server) code; so you'd need to set-up some kind of GUI-session daemon to do this processing.
Accept only the OOXML file formats and extract only plaintext content (this can be done easily enough without much knowledge of OOXML if you already have experience with manipulating XML in-code).
Accept only plaintext or HTML submissions. This is how most "upload your resume" sites work, including Apple's and Microsoft's careers websites.
If you just want to return the Word document to your visitors, then just return the raw bytes of the file using Response.WriteFile, or write directly to the Response's output stream if you're persisting the Word document outside of the filesystem.

Launching MS Word from Internet Explorer with parameters

I have a requirement for within an ASP.Net application to open a Word template from within the browser and pass in some parameters to a MS Word plugin that will be installed on the client.
Is it possible when opening Word from the browser to pass in any parameters and if so how do you go about this?
You cannot launch an application from the browser. You can cause an application to run by downloading a document for which the application is the startup application. I do not believe you can supply parameters in that case.
You can use DSOFile to edit word document properties on the server very efficiently and the client-side plugin can read the parameters using the word object model. This applies to *.doc files. I'm not sure what the exact equivalent is with *.docx.
http://support.microsoft.com/kb/224351

Resources