Menu

Some questions regarding use

Help
2007-01-17
2012-12-07
  • Roger Sperberg

    Roger Sperberg - 2007-01-17

    A couple questions that have come up during my initial use of XCE:

    I have files that are xml but have a different extension. How do I get XCE to recognize this?

    How do I get it to recognize XTM vocabulary? (Eg, XML Topic Maps, spec at http://www.topicmaps.org/xtm/, dtd at http://www.topicmaps.org/xtm/1.0/xtm1.dtd\)

    How big does a file need to be to be considered large? More than 10 MB? or more than 15 mb? I inadvertently chose open instead of open-large with a 15 mb file. Any way to cancel out of this? After ten minutes it still hadn't opened and I ended up closing the app.

    With xslt, I'd like the xsl:-namespaced elements to be one color and the elements I insert (typically from XTM) to be another. And I'd like xmlns to be red and other attributes to be another color (getting into my preferences here). I guess my question concerns whether I'll be able to do such things when make-your-own-color-schemes is available.

    Thanks,

    Roger Sperberg

     
    • gnschmidt

      gnschmidt - 2007-01-17

      <I have files that are xml but have a different extension. How do I get XCE to recognize this?>
      Currently the only route is the Windows route. Open with... should enable you to select XCE. From then on, the file should take the XCE document icon and open on double-click.

      <How do I get it to recognize XTM vocabulary?>
      If you're in a rush, you could copy the DTD to the folder C:\Program Files\XML Copy Editor\dtd\ and add a line to C:\Program Files\XML Copy Editor\catalog\catalog that maps the public ID to the file. (It's an XML file, so you can open it in XCE.) The line would be very similar to the ones for XHTML, TEI, DITA, and so on. Alternatively, I'm happy to find a template file and add the DTD with 1.0.8.9 :-)

      Linux users: simply install the DTD from your distro repository: XCE uses the system-wide catalog and should recognise the public ID.

      <How big does a file need to be to be considered large? More than 10 MB? or more than 15 mb? I inadvertently chose open instead of open-large with a 15 mb file.>
      15 MB shouldn't be a problem. I have opened 64MB files without too much delay. My best guess is that the encoding was not one of Expat's core encodings (UTF-8, UTF-16, ISO-8859-1, US-ASCII), in which case the memory requirement increases sharply. If the encoding is one of the above, something is going wrong! The large document option is intended for 32MB+ documents, but the precise measure depends on the amount of RAM that's available to you.

      I'm very happy to look into this – it's because other editors couldn't handle files of this size that I felt there is room for a new editor. If you have the document (any zip should compress the XML nicely) and it's not confidential, please feel free to email it to me.

      In future, I want to enable the large document option to handle huge files (up to 4GB), but that requires a disk-based editor and I have not been able to find even the simplest component that allows disk-based editing (and is open source). If you know of one, please let me know!

      <Any way to cancel out of this?>
      Not at this point in time unfortunately, but I agree that this would be very useful.

      <With xslt, I'd like the xsl:-namespaced elements to be one color and the elements I insert (typically from XTM) to be another. And I'd like xmlns to be red and other attributes to be another color (getting into my preferences here). I guess my question concerns whether I'll be able to do such things when make-your-own-color-schemes is available.>
      This links back to an earlier request of course. The lexer distinguishes between known and unknown tags, so it might be possible to tweak the known list to achieve this effect. I will need to look into this more closely.

       
    • Roger Sperberg

      Roger Sperberg - 2007-01-17

      <I have files that are xml but have a different extension. How do I get XCE to recognize this?>

      I realize now that the file that didn't show syntax highlighting had been opened with the Open Large Document command. I thought it was because of the extension.

      <How do I get it to recognize XTM vocabulary?>
      >If you're in a rush, you could copy ... Alternatively, I'm happy to find a template file and add the DTD with 1.0.8.9 :-)

      I would welcome that indeed. In the meantime, I've followed your steps, but I'm not sure how to tell if I did it right. At any rate, when the cursor is at a particular point in the file, the correct elements are suggested on the right.

      I would add the FictionBook.xsd and the NewsML 1.2 dtd and 2.0 xsd, but I'm not sure what to do with the xsd file. None of these three have a public identifier that I've been able to locate.

      >15 MB shouldn't be a problem. I have opened 64MB files without too much delay.

      I opened the file earlier with the Open Large Document command, so I know it's fine. I'll run some comparisons later if I can. I'm not sure if I can send you the file, however.

      <With xslt, .... I guess my question concerns whether I'll be able to do such things when make-your-own-color-schemes is available.>
      >This links back to an earlier request of course.

      Not that it matters beyond that personal preference thing, but I like the XML syntax coloring that XSelerator provides. I've mimicked it in other programs where I could set up syntax coloring.

      Thanks,

      Roger

       
      • gnschmidt

        gnschmidt - 2007-01-17

        <I would add the FictionBook.xsd and the NewsML 1.2 dtd and 2.0 xsd, but I'm not sure what to do with the xsd file. None of these three have a public identifier that I've been able to locate.>
        The catalog only works for DTDs at the moment, but I will add NewsML 1.2 as well as XTM for the next release. Thanks for suggesting these!

        <I opened the file earlier with the Open Large Document command, so I know it's fine.>
        Large document mode loads UTF-8 and (failing that) uses the local encoding. I'd be grateful if you could let me know what encoding the file uses. (If it's UTF-8 I'd be concerned as 15 MB really shouldn't require the large document mode, and certainly not take more than a few seconds to open in regular mode.)

         
      • gnschmidt

        gnschmidt - 2007-01-17

        PS I forgot to say that it seems as though you've installed the XTM DTD correctly. The test is that Insert Element should suggest elements that are not contained in your instance document. (If the program can't find a DTD, it uses the instance document itself for tag completion/insertion.)

        It's also worth checking that the document validates against the DTD when Network access for DTD validation is disabled in Tools>Options>General.

        -Gerald

         
    • Roger Sperberg

      Roger Sperberg - 2007-01-19

      Don't think I advised you that, yes, .xtm and .xtmm files are always topic maps and can be associated with the xtm1.dtd.

      Roger

       
      • gnschmidt

        gnschmidt - 2007-01-19

        That's great, thanks! I'll make sure the extensions are recognized.
        -Gerald

         
    • gnschmidt

      gnschmidt - 2007-01-27

      NewsML and XTM are supported as of 1.0.8.9. On Windows, the installer offers to associate xtm and xtmm with XCE.

       

Log in to post a comment.