Skip to main content
1-Visitor
September 16, 2010
Question

completeness check fails on xrefs

  • September 16, 2010
  • 9 replies
  • 1758 views
All,

We have a large document that we assemble from several smaller docs
managed and versioned independently. The large doc has a cross
reference where the ID is in one of the smaller docs and the IDREF is in
another. The problem is, our CMS checkin process (which we coded
ourselves), runs a completeness check on the doc first, and only
proceeds with the checkin if the check succeeds. The smaller docs with
the ID and the IDREF obviously fail the completeness check since the doc
is missing either the ID or the IDREF. Is there a way to get around
this while still running the completeness check?

Thanks,
--



Brian Jensen
bjensen@bluelid.com

    9 replies

    1-Visitor
    September 19, 2010
    If an attribute of type IDREF contains a value that is not present in an
    attribute of type ID in the same document, that document is not valid XML.
    I don't think there's much of anything you can do to get around that, and
    I'd be very surprised if Editor provides an option to skip that check.

    You could, however, modify your DTD to declare the IDREF attribute to be
    CDATA, instead.

    -Brandon 🙂


    BrianJ1-VisitorAuthor
    1-Visitor
    September 20, 2010
    Thanks for your reply Brandon. As I understand it (I'm asking for a
    coworker), the ID/IDREF types are required to get cross reference
    functionality in Arbortext. Am I mistaken? Anybody out there with
    external cross references that could explain how they are doing it?

    Thanks,



    Brian Jensen
    bjensen@bluelid.com


    1-Visitor
    September 20, 2010
    We have a similar situation where we have a larger doc made up of
    smaller docs. We wrote a tool to do a ID/IDREF check of the larger doc
    and we "turn-off" the ID/IDREF check of the smaller docs because we know
    that they may not "pass" because of the references to "other" docs.



    Could you do something along those lines?



    Ray


    BrianJ1-VisitorAuthor
    1-Visitor
    September 20, 2010
    Thanks Ray. Is there a way to turn off only the ID/IDREF check when
    doing the completeness check, or do you just not do the completeness
    check on the smaller docs?




    Brian Jensen
    bjensen@bluelid.com


    1-Visitor
    September 20, 2010
    In our case, we do the ID/IDREF check with an OmniMark program. When we
    do the parse of the smaller docs we use the "with id-checking false".
    Our tool that does the ID/IDREF checking of the larger doc also uses an
    OmniMark program.



    You had stated that you had coded the check-in process so I thought you
    may be in control of the ID/IDREF checking.



    Ray




    1-Visitor
    September 20, 2010
    Generally speaking, the only value you get from IDREF attributes is error
    messages from your parser if the referenced ID doesn't exist. Any special
    treatment, like linking or cross-referencing behavior, in either the
    authoring or publishing environments, is due to specific code in those
    tools, and that code is just matching up strings in the source and target,
    so it doesn't usually care about IDREF vs. CDATA. The cross-reference
    elements in DITA, for instance, use CDATA attributes and support cross-topic
    references. However, Arbortext has significant custom code to support
    these.

    My guess is that changing your IDREF attributes to CDATA probably will
    require few, if any, modifications to your publishing tools. As for the
    behavior within Editor, such as displaying generated text derived from the
    cross-reference target, unless you have some custom code in place for that
    now, you probably aren't getting it, anyway.

    It would probably be worth doing a test with the attributes as CDATA and see
    what functionality breaks, if any. You can always come back to the group
    with the specifics for help.

    -Brandon 🙂


    BrianJ1-VisitorAuthor
    1-Visitor
    September 20, 2010
    Ray and Brandon,

    Thanks again for your help. Our CMS is custom-made by us, but we run
    Arbortext's completeness check before we let the doc get any further in
    the checkin process. We are using Styler to manage the style of the
    Editor view and composed output, and PE to manage the composition. My
    coworker said he did try getting the cross references working without
    the ID/IDREF types, but it didn't work. With the ID/IDREF attributes in
    place he does have the cross references working properly, including the
    gentext.
    Ray, just to confirm, your "with id-checking false" parsing is referring
    to OmniMark, right?

    Thanks,



    Brian Jensen
    bjensen@bluelid.com


    1-Visitor
    September 20, 2010
    Yes, the "with id-checking false" does refer to OmniMark.


    1-Visitor
    September 22, 2010
    Hi, Brian...

    Okay, so let me see if I understand. You author a set of document
    components, working on just a single component at a time inside Arbortext
    Editor. These components sometimes have unresolved IDREF values because the
    target ID is in another component.

    When it's time to publish, some set of components gets assembled into a
    complete document, which conforms to the same DTD as the individual
    components, and a Styler style sheet is applied to it. The complete
    document has no unresolved IDREF values because all of the components are
    merged into a single file. Is all of that correct?

    Styler seems only want to let you use an IDREF attribute for specifying the
    target for a link or cross-reference, yet some of the distributed style
    sheets (such as for DITA) use CDATA attributes. If your Styler sheet is
    handling your cross-references correctly and the only issue is the errors
    you get about missing ID values, try changing the attribute on your
    cross-reference element to CDATA and see if everything works the same, minus
    the "missing ID" errors.

    If this doesn't get you where you need to go, we'd need some more
    information about your setup (markup examples, DTD details, etc.) and how
    exactly it "didn't work".

    -Brandon 🙂