Marked up index exported to XML
Hi,
I'm very new to ID. I am currently importing Excel tables into Indesign. Basically, my book/chapters are made up of tables. Next, I need to create an index therefore, I started marking up my content (creating index entry page references). Once our book is done we need to export this content to XML. I realize i can map styles to tags for the export to XML. However, my question is how can I export the markedup index content to xml? The whole idea of going from Excel to ID was so that we wouldn't have to do the index twice.
Any advice would be much appreciated.
With Scripting, you can do just about everything, except the one thing I wanted to show (off): creating a run of text in memory, then loading your 'place text cursor' with it ...
Anyway, this little javascript shows you how to "get" the index entries themselves out of InDesign. This is just the list of entries; each entry in itself (going by the name of "Topic") contains a list of PageReferences -- zero or more -- that point to the actual text insertion point where each of the entries proper reside in your full text. Weeding them out one by one should also be possible, and even automatically putting XML tags around them, but you have to remember they need to be "visible" in your plain text to be able to export. With that, I mean it might well be possible to write a script that writes out every entry as "plain text" (and possibly, including the correct tags), but they *will* appear inside the text where you inserted the actual index entry. Hence, my suggestion of very small and invisibly colored text.
I guess you'll need to think about how to handle this.
This is my "proof of concept" scriptlet; it only gathers the index entry list (with possible sub-entries) and displays them as an alert:
var list = [ "My Index" ];
for (i=0; i< app.activeDocument.indexes[0].topics.length; i++)
list.push (app.activeDocument.indexes[0].topics[i].name);
for (j=0; j<app.activeDocument.indexes[0].topics[i].topics.length; j++)
list.push (" >> "+app.activeDocument.indexes[0].topics[i].topics[j].name);
alert (list.join("\r"));
Similar Messages
-
Connect to Universe, query and export as xml
hello,
I'm trying to do the following:
Connect to a Universe, query and export as xml the results of this query. I want to do it with java not via Crystal Reports. To afterwards import the xml in another Universe.
So far I've tried connecting with The Bussiness Objects Enterprise SDK but I think Im not in the correct path. I can see the Universe I want to connect as a CI_APPOBJECTS by quering.
Which SDKs should I use? What procedure do you recommend?
Thanks a lotHi,
I have a problem with my code using Report Aplication Server SDK.
In my imports I have:
import com.businessobjects.sdk.biar.IExportOptions;
import com.businessobjects.sdk.biar.internal.ExportOptions;
import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.framework.ISessionMgr;
import com.crystaldecisions.sdk.occa.infostore.IInfoObject;
import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
import com.crystaldecisions.sdk.occa.managedreports.IReportAppFactory;
import com.crystaldecisions.sdk.occa.report.application.OpenReportOptions;
import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
import com.crystaldecisions.sdk.occa.report.application.PrintOutputController;
import com.crystaldecisions.sdk.occa.report.exportoptions.*;
But it was an error when I call three methods:
IXMLExportFormat xmlExportFormat = new XMLExportFormat();
XMLExportFormats xmlExportFormats = new XMLExportFormats();
IXMLExportFormatOptions xmlExpFormatOpts = new XMLExportFormatOptions();
xmlExportFormats = rcd.getPrintOutputController().getSavedXMLExportFormats(); //this
int index = xmlExportFormats.getDefaultExportSelection();
xmlExpFormatOpts.setXMLExportSelection(index);
xmlExportFormat = xmlExportFormats.getXMLExportFormat(index);
IExportOptions expOpts = new ExportOptions();
expOpts.setExportFormatType(ReportExportFormat.XML);//this
expOpts.setFormatOptions(xmlExpFormatOpts);//this
¿Where is the problem? -
Maintain Date/Time Stamp in Export as XML
Hello,
I've create a report which has a field as mm/dd/yyyy HH:mm.
When I export as .TXT .CSV, Excel ect it maintains the format; however when I export as XML I loose the formate and it exports as mm/dd/yyyy 12:00:00
The below in anyother format or in BusinessObjects would be 09/04/2007 10:38.
<COLUMN INDEX="6" ID="4" TYPE="Date" FORMAT="m/d/yyyy hh:mm:ss AM/PM">Actual Start (Date & Time)</COLUMN>
<CELL INDEX="6">9/4/2007 12:00:00 AM</CELL>
Any thoughts?
As well is it possible to customize tags of the exported XML so it is more of a XML document then a spreadsheet.Thank you!
For the issue with the Date/Time stamp is this a bug in older versions? I am using BusinessObjects 6.1; the only time it does this is when exported as XML
Cheers,
Tim
Edited by: Tim Whitehead on Jul 13, 2008 7:17 PM -
Structure inDesign document and export as XML for use in the web
Hello everyone,
I just recently started using inDesign and I am fascinated by its possibilities! I use it for a project where a finished inDesign layout that is used for a printed publication is now supposed to be transformed for implementing it on a web site. My job is to export the inDesign document as an XML file. After massive reading the last weeks I'm quite familiar with the structuring and tagging in inDesign. Though there's some issues I do not understand. Your precious advice would be of highest meaning to me
The programmer who will later use my XML output for the web-transformation needs the document structured in different levels like "Root > Chapter > Subchapter > Text passage / table". I already structured the document with tags like title, text passage, table, infobox,... but the structure is just linear, putting one item following to another.
How can I structure the document with reoccuring tags that enable me to identify the exact position of an item in the document's structure? So that I can say for example "text passage X" is located in chapter 4, subchapter 1. This has to be done because the document is supposed to be updated later on. So maybe a chapter gets modified and has to be replaced, but this replacement is supposed to be displayed.
I hope my problem becomes clear! That's my biggest issue for now. So for any help I'd be very thankful!Our print publications are created in InDesign CS5 for Mac then the text is exported to RTF files then sent to an outside company to be converted to our XML specifications for use by our website developers. I would like to create a workflow in which our XML tags are included in the InDesign layouts and then export the XML from the layouts.
Some more detail about what kind of formatting is necessary might be helpful.
I know that IDML files contain the entire layout in XML format. Is it a good idea to extract what we need from IDML, using the already-assigned tags?
Well, if you want to export the whole document, it's the only reasonable approach.
We use a workflow system such that each story is a seperate InCopy document, stored in ICML format (Basically a subset of IDML). Our web automation uses XSLT to convert each story into HTML for use on our web site; it also matches it up with external metadata so it knows what is a headline and what is not, etc.. It is not exactly hassle free, and every once in a while someone uses a new InDesign feature that breaks things (e.g., our XSLT has no support for paragraph numbering, so numbered paragraphs show up without their numbers).
You could do the same thing with with IDML, you'd just have to pick out each story, but that's small potatoes compared to all the XSL work you're going to have to do.
On the other hand, there may be better approaches if you're not going to export the whole document. For instance, you could use scripting to export each story as an RTF file, and then you could convert the RTF files into HTML using other tools. -
PBDOM : Exporting to XML file gives a single line
I've been starting developing with PowerBuilder 12.5 a few weeks ago. I had to write some XML files, so I got familiar with the PBDOM library.
I can build a lot of different things, it's very nice, but one thing still bothers me :
In the output file, the whole XML is written on a single line.
I use the SaveDocument function.
For example, here is some code :
PBDOM_Document doc
PBDOM_Element noderoot, node1, node11, node12
doc = CREATE PBDOM_Document
doc.NewDocument("NodeRoot")
noderoot = doc.GetRootElement()
node1 = CREATE PBDOM_Element
node1.SetName("Node1")
noderoot.AddContent(node1)
node1.SetAttribute("Attr", "AttrValue")
node11 = CREATE PBDOM_Element
node11.SetName("Node11")
node11.AddContent("Here is a value")
node1.AddContent(node11)
node12 = CREATE PBDOM_ELEMENT
node12.SetName("Node12")
node12.AddContent("Here is another value")
node1.AddContent(node12)
doc.SaveDocument("myDoc.xml")
Here is the result when I open it with notepad++
<NodeRoot><Node1 Attr="AttrValue"><Node11>Here is a value</Node11><Node12>Here is another value</Node12></Node1></NodeRoot>
Whereas I wanted :
<NodeRoot> <Node1 Attr="AttrValue"> <Node11>Here is a value</Node11> <Node12>Here is another value</Node12> </Node1> </NodeRoot>
With the notepad++ XML tools plugin, I can use the "pretty print" function to get this nice representation. But I would like my file to be formatted this way from the beginning. I noticed that the "line ending" was set to UNIX format (indicator on bottom right of the window), but I'm working on Windows. When I use the menu to convert it to Windows format (CR+LF), it changes this indicator, but the code stays on one single line.
Is there a way to tell PBDOM to export the XML file with a nice output ?
Thank you !
Notes :
- Opening the XML file with Internet Explorer or Google Chrome gives me a nice vizualisation, with indentation, line breaks...
- Adding a <?xml version="1.0" encoding="ISO-8859-1" ?> does not help (I've been doing it while exporting some more complex files, but I still get the output on one line...)Here is a very simple powerbuilder example. It uses MSXML instead of PBDOM. See my comments for hints how to use it with PBDOM.
oleobject lole_dom, lole_root, lole_element1, lole_element11, lole_element12
oleobject lole_Writer, lole_saxreader
string ls_result
// build DOM (you don't need this if you use PBDOM)
lole_dom = create oleobject
lole_dom.ConnectToNewObject ("Msxml2.DOMDocument")
lole_root = lole_dom.CreateElement ("NodeRoot")
lole_dom.documentElement = lole_root
lole_element1 = lole_dom.CreateElement("Node1")
lole_root.AppendChild(lole_element1)
lole_element1.SetAttribute("Attr", "AttrValue")
lole_element11 = lole_dom.CreateElement("Node11")
lole_element11.AppendChild (lole_dom.CreateTextNode("Here is a value"))
lole_element1.AppendChild(lole_element11)
lole_element12 = lole_dom.CreateElement("Node12")
lole_element12.AppendChild (lole_dom.CreateTextNode("Here is another value"))
lole_element1.AppendChild(lole_element12)
// this saves the DOM without formatting
//lole_dom.save ("d:\testxml.xml")
// this part is for formating
lole_Writer = create oleobject
lole_saxreader = create oleobject
lole_Writer.ConnectToNewObject ("MSXML2.MXXMLWriter")
lole_saxreader.ConnectToNewObject ("MSXML2.SAXXMLReader")
lole_Writer.omitXMLDeclaration = True
lole_Writer.indent = True
lole_saxreader.contentHandler = lole_Writer
// instead of DOM you can also put a XML string to parser: lole_saxreader.parse ("<node>...</node>")
// so you can also use the PBDOM output directly
lole_saxreader.parse (lole_dom)
// here is your formatted output
ls_Result = lole_Writer.output
MessageBox ("", ls_result)
lole_writer.Disconnectobject( )
lole_saxreader.Disconnectobject( )
lole_dom.Disconnectobject( )
DESTROY lole_writer
DESTROY lole_saxreader
DESTROY lole_dom -
Documents are marked for indexing but indexing is not happening
Hi All,
I have completed the configuration of Trex 7.10 ; and also I have tested the settings by executing the report "RCF_CHECK_SEARCH_SETTINGSu201D in SE38 and found no errors, but the problem here is documents are marked for indexing but not getting indexed.
I need some help to resolve this issue
Regards
SivaHi Siva,
This should help http://wiki.sdn.sap.com/wiki/x/gQ8oCw -
hi,
I am getting the following error while exporting to xml
please can neone help
thanks in advance
ORA-06502: PL/SQL: numeric or value error: character to number conversion errorThere is an error because a character is trying to be converted to a number?
Check your inserts and data types are correct. -
Need help for Export to XML Functionality
Hi All ,
I have developed a report in Apex2.2 to export the data into XML format .
I have used "export to XML" functionality and "HTF.escape_sc" function to escape special characters.The query is as follows..
select
HTF.escape_sc(replace (e.EVENT_NAME,'''','&'||'apos;')) AS EVENT_NAME ,
HTF.escape_sc(replace (e.VENUE_NAME,'''','&'||'apos;')) AS VENUE_NAME ,
HTF.escape_sc(replace (e.VENUE_ADDR,'''','&'||'apos;')) AS VENUE_ADDR ,
HTF.escape_sc(replace (e.DESCRIPTION,'''','&'||'apos;')) AS DESCRIPTION ,
HTF.escape_sc(replace (e.TRACKING_URL,'''','&'||'apos;')) AS TRACKING_URL ,
HTF.escape_sc(replace (d.primary_product,'''','&'||'apos;')) AS primary_product
from events e ,d_01 d
where
d.event_id = to_char(e.event_id)
and e.publish = 'external'
and e.searchable = 'Y'
The output result in XML in APEX2.2 is absolutely fine , but when i moved the application to apex.oracle.com the XML report instead of '&' it is displaying "%26amp" .
Is there any problem with APEX3.3 .
Appreciate your quick response.
Thanks
JyotiJyoti,
Replacing special characters from where? Report? Replacing by what?
The code for the package is open. You may use the part in the package body:
FOR i IN 1 .. CEIL (v_xml_l / 4000)
LOOP
v_xml_cut := SUBSTR (v_xml, v_count, 4000);
HTP.prn (v_xml_cut);
v_count := v_count + 4000;
END LOOP;
...and do something like
HTP.prn (REPLACE(v_xml_cut, '&', '&lt;'));
...Denes Kubicek -
Hi all!
I'm a Newbie in BC4J, but I have to create an apllication with this technology.
My problem is, that one table should be exported to XML. I know that the standard Apllication, created by a wizard got this feature, but I didn't found the sourcecode.
Is there anybody, who knows how to implement an XML-Export?
Thanx
Peter ZerwesGet the ViewObject reference that you want to export, e.g, in an AM say there's Dept/Emp VOs setup as masterdetail,
you may then get the DeptVO and call one of the writeXML() apis on it.
See javadoc for oracle.jbo.ViewObject and oracle.jbo.XMLInterface.writeXML(). -
Automatically Exporting to XML when open a file
Hello,
I'm trying to set up my new machine to export the XML of a file when I open it by dragging the files onto the Ps icon (Mac). It used to automoatically happen on my old work machine, and it's super helpful. I'm pulling my hair out trying to find the setting for something like this. Does anyone know what I'm talking about? Thanks in advance.Thanks!
Sorry, I'm sort of a dummy with this stuff and have never used bridge. how do I do that?
I'm specifically opening .png files and using the xml code to get the coordinates of the images for placement after I trim them. -
Export large xml file in PL/SQL
How to export large or big xml (XMLTYPE) into file system.
I have tried with...
1. UTL_FILE.PUT -- it has a limitation of 32767 chars
2. DBMS_XSLPROCESSOR.CLOB2FILE supports little more than UTL_FILE but not in MB's
i'm looking for options to export a xml file which is more than 5mb
any suggestions?user12020576 wrote:
I have tried with...
1. UTL_FILE.PUT -- it has a limitation of 32767 chars
It might have but this is not a problem, if you programmatically break it up in pieces.
Have a look at https://forums.oracle.com/message/9748097#9748097
The method demonstrates how to dump/write a CSV in binary format to disk.
I used it to dump/write files way bigger than 10++ MB in size... -
Framemaker 9.0p196 crashes while exporting to xml
Hello,
This occurs both with XP Pro SP3 and Win7 iSP 1 . On a XP Pro SP3 without domain connection the crash does not occur. According to the event log caused ntdll.dll the crash.
Addendum: The XML is created correctly. this happens to all book projects, new and old. Does anyone have an idea?You could try checking your version of ntdll.dll (a Windows protected system file) for corruption using the "sfc /scannow" command. This replaces corrupted protected system files with the correct MS ones. Also, you could then check if there are any issues with the DirectX graphics (the drivers could be affecting the FM behaviourr) on your system using the DXDIAG utility.
However, as it seems to happen on two systems, the corruption doesn't seem that likely of a culprit. Are you using FM with the structure or unstructured interface, i.e. is your workflow creating the XML using the Save As XML from unstrucured files or are you exporting the XML from a structured application? -
Adding crop marks in jpeg export
Hi All,
Is is possible to add crop marks in jpeg export similar to what we have in pdf export.
I see SnapshotUtils class but could not see any method to set crop marks.
What I need to do to set crop marks?
Regards,
AlamWell, since there is no Crop Marks option when doing a JPEG Export (Snapshot) by hand, I would be very surprised if there were a plug-in API for it.
So I think you'll have to add your own Crop Marks before you do the JPEG Export. It isn't really that hard ... just a little tedious. You can get the general idea from the CropMarks.jsx script that comes with InDesign. -
Indexing external files (XML) - problem!
Hi there,
I have some difficulties to get Intermedia index my external xml-files - indeed, the query does not work properly:
create table dummytable
(id number primary key,
docs varchar2(2000));
insert into dummytable values
(111,'book1.xml');
insert into dummytable values
(112,'book2.xml');
begin
ctx_ddl.drop_preference('COMMON_DIR');
ctx_ddl.create_preference
('COMMON_DIR','FILE_DATASTORE');
ctx_ddl.set_attribute
('COMMON_DIR','PATH','r:\mydocs');
ctx_ddl.create_section_group
('dummy_sections', 'XML_SECTION_GROUP');
ctx_ddl.add_zone_section
('dummy_sections', 'titlesec', 'Title');
ctx_ddl.add_zone_section
('dummy_sections', 'authorsec', 'Author');
ctx_ddl.create_preference
('dummy_basic_lexer','basic_lexer');
ctx_ddl.set_attribute
('dummy_basic_lexer','index_text','true');
ctx_ddl.set_attribute
('dummy_basic_lexer','index_themes','false');
end;
create index dummyindex on dummytable(docs)
indextype is ctxsys.context
parameters ('datastore COMMON_DIR
lexer dummy_basic_lexer
SECTION GROUP dummy_sections');
select id from dummytable where contains
(docs,'LeCarre WITHIN authorsec')>0;
This example is taken out of "Oracle XML Handbook".
book1.xml:
<Book>
<Id>4</Id>
<Author>John LeCarre</Author>
<Title>The Night Manager</Title>
</Book>
Although the select statement should print out '111', it does not?!?
A query for 'LeCarre' (without authorsec) is successful!
Does anybody can help me?
Thanks a lot in advance!!
AchimSee "2. Reading a file" in How To : Read and Write Office 2003 Excel XML Files | Odie's Oracle Blog
You can use the external table (or SQL*Loader) to bulk load all files at once in a binary XMLType table, and then using XMLTable to query the content.
There's another way I've been exploring recently, involving the external table preprocessor and XSLT, but it only performs well in the latest 12.1 release.
You can read more here if interested : XMLTABLE vs. External XSLT preprocessor | Odie's Oracle Blog
But for your current requirement, an XMLTable query as described in the first link should be just fine. -
Export to XML is grayed out.
Hello. I am trying to export an XML from FCPX for an editor to use in Avid. My problem is that I highlight all the clips in the timeline and then I go to the top menu and try choose File / Export XML and Export XML is grayed out, so I may not choose it.
Is there any reason why this feature may be grayed out. I am using the trial version of FCPX but nowhere does it say there are any limitations.
Thank you very much for your time.
_Deyson OrizThank Tom, I was hoping for 1 step procedure. I hope an app comes out soon to make it easier.
Have an awesome day!
Maybe you are looking for
-
Schedule line date in Sale order for backward sched.
Dear Experts, In my MTO Scenario, I want to Use Backward Scheduling, so as any change in Schedule line dates in Sale order shall take effect at least in planned order Stage, i.e in output of MRP, But not happening so.. I have customized OPU5 and che
-
Hi. Both myself and my wife are on the same account meaning same credit card. The problem with this is we both receive each others contacts and see each others I messages. How can my wife have a different name so we are separate on such things as con
-
I can no longer email a Pages document. When I click Share my Share Via Email is grayed out. If I click pdf the window disappears and nothing happens. Any ideas?
-
USB devices don't appear in Sidebar or Finder but do appear on Desktop
After upgrading to Leopard from 10.3, I notice that when I plug a flash drive into the keyboard USB port of my 1.8 GHz iMac G5 the drive appears on the desktop, but not in the Finder or Sidebar. I believe this problem is also affecting PhoneValet, wh
-
Photoshop color settings - what is Photoshop doing?
Hello, I'm trying to understand how converting to different color profiles within Photoshop works. What I'm trying to understand is why, when I have a document saved in with an embedded color profile of "Adobe RGB (1998)", when I *convert* the color