Skip to main content
1-Visitor
April 10, 2013
Question

output "TARGET NOT FOUND" when an #XREF fails to resolve?

  • April 10, 2013
  • 2 replies
  • 801 views
Hi,
I'm fairly certain it's not possible to do this, but I'm not finding
confirmation the adepters archives. I would like to output some stock
warning if a cross reference fails at composition. Does anyone have a
stylesheet trick for this?

I can validate the XML before submitting it, but I'm hoping to be able to
deliver a FIXMEDUDE type of warning to the output. So far I'm not able to
figure out how to do that.

Thanks.

--
Paul Nagai

    2 replies

    18-Opal
    April 15, 2013
    Hi Paul--



    My first thought about this would be to add a condition that checks for
    the existence of the target and adds the FIXMEDUDE text in that case.
    You could use XPath for this, basically just use the XPath id() function
    to find the target of the href.



    Have you tried something like this? If so, in what way didn't it solve
    your problem?



    --Clay



    Clay Helberg

    Senior Consultant



    TerraXML

    1380 Forest Park Circle, Suite 100

    Lafayette, CO 80027
    naglists1-VisitorAuthor
    1-Visitor
    April 15, 2013
    Thanks, Clay.

    See other conversation re: what you learn first informing what you
    remember/think of as possible.

    <att>
    <specval attname="count(id(@ID))" attloc="#XPATH" attval="0">
    <charsubset>
    <usetext source="FIXMEDUDE"></usetext>
    </charsubset>
    </att>