I think the location is coming from the XML document that you pasted
earlier. In other words, the location is "reference.dtd" in:
> <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
Wayne Brissette <
wbri...@att.net> writes:
> Mike:
>
> The question I have is where does that go? In other words,
>
> options= Nokogiri::XML::ParseOptions::DTDLOAD That says to load the DTD, but is
>> require 'nokogiri' xml= <<-EOXML <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
>> <reference id="reference_y1f_bpy_hmb">
>> <title>Simple Title</title>
>> <shortdesc>Reference SD</shortdesc>
>> <refbody> <p>should not be here</p></refbody>
>> </reference>
>> EOXML options= Nokogiri::XML::ParseOptions::DTDLOAD # options: 4 doc= Nokogiri::XML::Document.parse(xml,nil,nil, options)
>> # 2:79: WARNING: failed to load external entity "reference.dtd"
>> puts doc.validate
>> # 3:0: ERROR: No declaration for element reference# 3:0: ERROR: No
>> declaration for attribute id of element reference# 4:0: ERROR: No
>> declaration for element title# 5:0: ERROR: No declaration for
>> element shortdesc# 6:0: ERROR: No declaration for element refbody#
>> 6:0: ERROR: No declaration for element p
>> externalSubSet = doc.external_subset
>> # nil
>>
>>
>> So I can clearly see that I'm not loading the external DTD. Which is probably true, oXygen and the DITA OT have their own local copies of this file.
>>
>> oXygen says this:
>>
https://www.oxygenxml.com/dita/1.3/specs/non-normative/dtd-public-identifiers.html
>>
>> So, the question I have is since it can't seem to find the external entity because it's elsewhere, how can I feed that information to Nokogiri?
>> I can read the DTD in from one of the local DITA OT or oXygen shells (I've tried this with our own customized DTD), but I've not had much luck trying to feed that into Nokogiri.
>>
>> So, I understand the issue, but the question then becomes, **how** do I properly tell Nokogiri how to ingest the DTD so it can do the validation?
>>
>> -Wayne
>>
>> -- You received this message because you are subscribed to the Google
>> Groups "nokogiri-talk" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to
nokogiri-tal...@googlegroups.com
>> <mailto:
nokogiri-tal...@googlegroups.com>.
>> <
https://groups.google.com/d/msgid/nokogiri-talk/35617fdb-9056-418a-9c39-3534f4cd4e8do%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>
>> -- You received this message because you are subscribed to the Google
>> Groups "nokogiri-talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to
nokogiri-tal...@googlegroups.com
>> <mailto:
nokogiri-tal...@googlegroups.com>.
>> To view this discussion on the web visit
>>
https://groups.google.com/d/msgid/nokogiri-talk/CAGJbjKZXwWxvV97G0HJpXifxXRNHWzPi1CB%2By4kJVMOZoTQ6Kw%40mail.gmail.com
>> <
https://groups.google.com/d/msgid/nokogiri-talk/CAGJbjKZXwWxvV97G0HJpXifxXRNHWzPi1CB%2By4kJVMOZoTQ6Kw%40mail.gmail.com?utm_medium=email&utm_source=footer>.