Hello All, I am hoping there is someone that can help me with this. I have a valid XML file from a database that I need to bring into ID CS2. I have tags and styles that all match, however when I Import XML, it comes in like a run-on sentence. The line breaks are not remaining and as a result, the styles are not mapping properly. I really need to keep these tags. An example of my output is:%26lt;br /%26gt;%26lt;Cat%26gt;ANESTHESIOLOGY%26lt;/Cat%26gt; %26lt;br /%26gt; %26lt;Sub_Cat%26gt;Accessory Products%26lt;/Sub_Cat%26gt; %26lt;br /%26gt; %26lt;Product%26gt;Regulators%26lt;/Product%26gt; %26lt;br /%26gt;- %26lt;List%26gt;%26lt;br /%26gt; %26lt;Prod_CompanyName%26gt;Allied Healthcare Products, Inc.%26lt;/Prod_CompanyName%26gt; %26lt;br /%26gt; %26lt;Prod_City_Adv%26gt;St. Louis%26lt;/Prod_City_Adv%26gt; %26lt;br /%26gt; %26lt;Prod_State_Adv%26gt;MO%26lt;/Prod_State_Adv%26gt; %26lt;br /%26gt; %26lt;/List%26gt;%26lt;br /%26gt;- %26lt;List%26gt;%26lt;br /%26gt; %26lt;Prod_CompanyName%26gt;Precision Medical, Inc.%26lt;/Prod_CompanyName%26gt; %26lt;br /%26gt; %26lt;Prod_City_Adv%26gt;Northampton%26lt;/Prod_City_Adv%26gt; %26lt;br /%26gt; %26lt;Prod_State_Adv%26gt;PA%26lt;/Prod_State_Adv%26gt; %26lt;br /%26gt; %26lt;/List%26gt;%26lt;br /%26gt;%26lt;Cat%26gt;%26lt;Sub_Cat%26gt;%26lt;Product%26gt; and %26lt;List%26gt; are paragraph styles while the %26lt;Prod%26gt; tags are character styles. It does not stay nice and neat like above.%26lt;br /%26gt;%26lt;br /%26gt;I am open to suggestions!%26lt;br /%26gt;%26lt;br /%26gt;Thanks in advance!%26lt;br /%26gt;AndreaInDesign CS2 and XML
The line breaks in your XML file are there to make the XML code pretty. They have no meaning when imported into ID.
If you don't want your company/address elements to be a run-on line, then you'll need paragraph styles for the elements, not character styles. You can, however, reuse the same style for multiple elements as long as you map things correctly.
And, as always, I have to plug Jim Maivald's excellent book. It is an invaluable resource for anyone working with ID and XML and will pay for itself very quickly.
Tad
InDesign CS2 and XML
Thanks for your quick reply Tad! I did order Jim's book last night and hope it will help me along.
Originally these were all paragraph styles, but I couldn't get the line to turn, so I tried character styles out of experimentation more than anything.
OK, so I ordered the InDesign/XML book at Tad's suggestion and I must admit I am even more frustrated than before.
Please see my original post above. Is there anyone out there who can help me?
Thanks,
Andrea
Andrea,
If you send me a sample of what you'd like your ID doc to look like, I'll send an example using your XML file.
Regards,
Tad
Thanks very much for your assistance Tad.
%26lt;br /%26gt;
%26lt;br /%26gt;Here is how I need it to look like...
%26lt;br /%26gt;ANESTHESIOLOGY (centered in a column)
%26lt;br /%26gt;Accessory Products (flush left from here to the end)
%26lt;br /%26gt;Regulators
%26lt;br /%26gt;Allied Healthcare Products, Inc.St. LouisMO
%26lt;br /%26gt;Precision Medical, Inc. Northampton PA
%26lt;br /%26gt;Responsive Respiratory Inc. St. Louis MO
%26lt;br /%26gt;Equipment
%26lt;br /%26gt;Anesthesia Delivery Systems
%26lt;br /%26gt;Westmed Inc Greenwood Village CO
%26lt;br /%26gt;Anesthesia Machines
%26lt;br /%26gt;GVS-NY Farmingdale NY
%26lt;br /%26gt;
%26lt;br /%26gt;But this is how it imports:
%26lt;br /%26gt;ANESTHESIOLOGYAccessory ProductsRegulatorsAllied Healthcare Products, Inc.St. LouisMOPrecision Medical, Inc.NorthamptonPAResponsive Respiratory Inc.St. LouisMOEquipmentAnesthesia Delivery SystemsWestmed IncGreenwood VillageCOAnesthesia MachinesGVS-NYFarmingdaleNYAnesthesiology MonitorsCriticare SystemsWaukeshaWI
%26lt;br /%26gt;
%26lt;br /%26gt;I can see the tags and most come in correctly tagged, but when I map tags to styles, they do not apply.
%26lt;br /%26gt;
%26lt;br /%26gt;Here is my DTD:
%26lt;br /%26gt;%26lt;?xml encoding=''utf-8''?%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;I am wondering if I am not understanding the purpose of the DTD. I was hoping it would guide the XML as to how I need it to import/display in InDesign. Is that not correct?
%26lt;br /%26gt;
%26lt;br /%26gt;I hope this makes sense. Thanks again for your assistance! Andrea
Here is the rest of my post...
%26lt;br /%26gt;Here is my DTD:
%26lt;br /%26gt;%26lt;?xml encoding=''utf-8''?%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;
%26lt;br /%26gt;I am wondering if I am not understanding the purpose of the DTD. I was hoping it would guide the XML as to how I need it to import/display in InDesign. Is that not correct?
%26lt;br /%26gt;
%26lt;br /%26gt;I hope this makes sense. Thanks again for your assistance! Andrea
For some reason the rest of my post won't post...
All tags are eaten by the formatter, not just HTML. Hopefully something that'll get better with the upcoming New and Improved Forums (they'll probably add Flickr and Spotted buttons).
But I'm pretty sure posting your data set here is not what Tad meant. Try clicking his name to get direct contact information, and send him the file or files directly.
Yes... I have her files now. Unfortunately, she has discovered one of the, er, ''constraints'' of XML support in ID. Although you can have multiple instances of %26lt;tag%26gt; in an XML structure --- %26lt;my%26gt;.%26lt;tag%26gt;, %26lt;your%26gt;.%26lt;tag%26gt;, etc. --- you can only have one mapping to %26lt;tag%26gt; in your ID layout. It's a royal PITA.%26lt;br /%26gt;%26lt;br /%26gt;Tad
Subscribe to:
Post Comments
(Atom)
No comments:
Post a Comment