OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

dita message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [dita] Question about syntax for the @anchorref attribute


Section 3.1.2.1.1 map in the spec doesn't make clear what the datatype of the anchorref attribute is.  I would have assumed it was an href type (like conref) and hence should be a DITA-style URI reference.  In that case, any value without the # fragment identifier character and without an initial URI scheme (e.g., the http:// part) would be a relative file path.  So anchorref="a1" would point to a file named "a1" in the same directory as the current map document and anchorref="map1.ditamap/a1" would point to a file named "a1" in a subdirectory named "map1.ditamap" (neither of which is probably what we meant to say here).

 

But maybe anchorref isn't an href type attribute.  I couldn't really say.  I hope someone else who knows better chimes in.

 

paul

 

From: Kristen Eberlein [mailto:keberlein@sdl.com]
Sent: Tuesday, 2010 November 30 7:07
To: dita@lists.oasis-open.org
Subject: [dita] Question about syntax for the @anchorref attribute

 

Hi, TC members.

 

I’ve been asked about the correct syntax for the @anchorref attribute on the <map> element. As I’ve read through various spec topics, I’ve gotten confused. I think this might be an area that that we need to consider for future clarification.

 

Question

In map1.ditamap, an anchor is defined with an @id attribute set to “a1”.

<map id="A">

   <title>MyComponent tasks</title>

   <topicref navtitle="Start here" href=""start.dita"" toc="yes">

     <navref mapref="othermap2.ditamap"/>

     <navref mapref="othermap3.ditamap"/>

     <anchor id="a1"/>

   </topicref>

</map>

In map2.ditamap, which contains the content to be pulled into map1.ditamap at the anchor point, what syntax should be used for the @anchorref attribute?

 <map id="B" anchorref="?">

   <title>This map is pulled into the MyComponent task map</title>

   ...

</map>

And I assume that map2.ditamap must be referenced somewhere in map1.ditamap in order for the <anchor> element to be resolved?

Topics in the DITA 1.2 spec

 

The topics in the DITA 1.2 spec suggest several distinct possibilities; which is correct?

 

2.1.2.2.3 DITA map elements

http://docs.oasis-open.org/dita/v1.2/cs01/spec/archSpec/ditamap-elements.html#ditamap-elements

Read down to the “Example of maps that use the <anchor> element and the @anchorref attribute” section; it suggests that the syntax should be as follows:

 

<map anchorref="a1">

...

</map>

 

3.1.2.1.1 map

http://docs.oasis-open.org/dita/v1.2/cs01/spec/langref/map.html#map

The explanation for the @anchorref attribute suggests that the syntax should be the following:

<map id="B" anchorref="map1.ditamap/a1”>

...

</map>

 

 

2.1.3.4.2 URI-based (direct) addressing

http://docs.oasis-open.org/dita/v1.2/cs01/spec/archSpec/uri-based-addressing.html#uri-based-addressing

The section titled “URI reference syntax examples” lists the following syntax for targeting an element within a map:

 

"http://example.com/map.ditamap#elementID" (and a value of "ditamap" for the format attribute)

Best regards,

Kris

Kristen James Eberlein l DITA Architect and Technical Specialist l SDL Structured Content Technologies Division l (t) + 1 (919) 682-2290 l keberlein@sdl.com

 SDL_logo-02

Please consider the environment before printing this e-mail

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]