XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 3rd, 2011, 12:40 PM
manzellb manzellb is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 27 manzellb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 40 m 3 sec
Reputation Power: 0
XML causing crash on InDesign open

I've created an IDML (InDesign Markup Language - it's an XML format) document with XML/XSLT

The document will open, but seems to crash with certain data in an XML story. For example, a story with the following data will open perfectly:

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Story xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging"
             DOMVersion="6.0">
   <Story Self="uf6" AppliedTOCStyle="n" TrackChanges="false" StoryTitle="$ID/"
          AppliedNamedGrid="n">
      <StoryPreference OpticalMarginAlignment="false" OpticalMarginSize="12" FrameType="TextFrameType"
                       StoryOrientation="Horizontal"
                       StoryDirection="LeftToRightDirection"/>
      <InCopyExportOption IncludeGraphicProxies="true" IncludeAllResources="false"/>
     
      <Table HeaderRowCount="2" FooterRowCount="0" ColumnCount="7"
             AppliedTableStyle="TableStyle/TableCTM"
             TableDirection="LeftToRightDirection"
             BodyRowCount="50"
             Marque="AC">
         <Row Name="0"/>
         <Row Name="1"/>
         <Column Name="0" SingleColumnWidth="18"/>
         <Column Name="1" SingleColumnWidth="42"/>
         <Column Name="2" SingleColumnWidth="51"/>
         <Column Name="3" SingleColumnWidth="24"/>
         <Column Name="4" SingleColumnWidth="24"/>
         <Column Name="5" SingleColumnWidth="24"/>
         <Column Name="6" SingleColumnWidth="24"/>
         <Cell Name="0:0" ColumnSpan="7" AppliedCellStyle="CellStyle/Header-Marque">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pHeader-Marque">
               <Content>AC</Content>
            </ParagraphStyleRange>
         </Cell>
         <Cell Name="0:1" AppliedCellStyle="CellStyle/Header-Year">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pHeader-Year">
               <Content>Year</Content>
            </ParagraphStyleRange>
         </Cell>
         <Cell Name="1:1" AppliedCellStyle="CellStyle/Header-Model">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pHeader-Model">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cPipe">
                  <Content>|    </Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cHeader-Model">
                  <Content>Model</Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>
         <Cell Name="2:1" AppliedCellStyle="CellStyle/Header-BodyStyle">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pHeader-BodyType">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cPipe">
                  <Content>|    </Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cHeader-BodyType">
                  <Content>Body Style</Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>
         <Cell Name="3:1" AppliedCellStyle="CellStyle/Header-Price">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pHeader-Price">
               <Content>4</Content>
            </ParagraphStyleRange>
         </Cell>
         <Cell Name="4:1" AppliedCellStyle="CellStyle/Header-Price">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pHeader-Price">
               <Content>3</Content>
            </ParagraphStyleRange>
         </Cell>
         <Cell Name="5:1" AppliedCellStyle="CellStyle/Header-Price">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pHeader-Price">
               <Content>2</Content>
            </ParagraphStyleRange>
         </Cell>
         <Cell Name="6:1" AppliedCellStyle="CellStyle/Header-Price">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pHeader-Price">
               <Content>1</Content>
            </ParagraphStyleRange>
         </Cell>
         <Row Name="2"/>
         <Cell AppliedCellStyle="CellStyle/Body-Year" Name="0:2">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pBody-Year">
               <Content>1947</Content>
            </ParagraphStyleRange>
         </Cell>
         <Cell AppliedCellStyle="CellStyle/Body-Model" Name="1:2">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pBody-Model">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cPipe">
                  <Content>|    </Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cBody-Model">
                  <Content>2-Litre </Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>
         <Cell AppliedCellStyle="CellStyle/Body-BodyStyle" Name="2:2">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pBody-BodyType">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cPipe">
                  <Content>|    </Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cBody-BodyType">
                  <Content>Tourer</Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>
         <Cell AppliedCellStyle="CellStyle/Body-Price" Name="3:2">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pBody-Price">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cDollarSign">
                  <Content>$</Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cBody-Price">
                  <Content>22,000</Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>
         <Cell AppliedCellStyle="CellStyle/Body-Price" Name="4:2">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pBody-Price">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cDollarSign">
                  <Content>$</Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cBody-Price">
                  <Content>32,000</Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>
         <Cell AppliedCellStyle="CellStyle/Body-Price" Name="5:2">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pBody-Price">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cDollarSign">
                  <Content>$</Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cBody-Price">
                  <Content>42,500</Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>
         <Cell AppliedCellStyle="CellStyle/Body-Price" Name="6:2">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pBody-Price">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cDollarSign">
                  <Content>$</Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cBody-Price">
                  <Content>60,000</Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>

      </Table>
   </Story>
</idPkg:Story>


However, If I add the following <Row> and <Cell> elements [immediately after the last </Cell> element in the working document, I get a crash:

Code:
<Row Name="3"/>        
         <Cell ColumnSpan="2" AppliedCellStyle="CellStyle/FillerCell" Name="0:3"/>
         <Cell AppliedCellStyle="CellStyle/SubBody-BodyStyle" Name="2:3">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pSubBody-BodyType">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cPipe">
                  <Content>|    </Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cSubBody-BodyType">
                  <Content>Sal</Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>
         <Cell AppliedCellStyle="CellStyle/SubBody-Price" Name="3:3">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pSubBody-Price">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cDollarSign">
                  <Content>$</Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cBody-Price">
                  <Content>7,900</Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>
         <Cell AppliedCellStyle="CellStyle/SubBody-Price" Name="4:3">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pSubBody-Price">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cDollarSign">
                  <Content>$</Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cBody-Price">
                  <Content>13,900</Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>
         <Cell AppliedCellStyle="CellStyle/SubBody-Price" Name="5:3">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pSubBody-Price">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cDollarSign">
                  <Content>$</Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cBody-Price">
                  <Content>21,500</Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>
         <Cell AppliedCellStyle="CellStyle/SubBody-Price" Name="6:3">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/pSubBody-Price">
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cDollarSign">
                  <Content>$</Content>
               </CharacterStyleRange>
               <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/cBody-Price">
                  <Content>28,900</Content>
               </CharacterStyleRange>
            </ParagraphStyleRange>
         </Cell>


Can someone shine a light is what is wrong with the above? They're all generated with the same XSLT script, so I don't think it can be an issue of malformed XML, but who knows? I know the BodyRowCount is off - it works fine with (say) 2 header rows and 2 body rows - but not 3 body rows. With some other data, it will work fine with 10s or 20s of body rows

Anyhow, all help is appreciated!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML causing crash on InDesign open

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap