-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Links between Optic JavaScript and XQuery functions wrong #624
Comments
@gfurbush for an example, I'm looking at /AccessPlan.prototype.col. The XQuery link is /:prototype.col (with text "XQuery :prototype.col"). What should it be? |
In that case, it should be "XQuery op:col" |
Oh, so all the XQuery Optic functions are in the What does it mean for methods that appear in more than one class, like There's such a lack of symmetry between the two APIs, I kinda wonder if we should link between them at all at the function page level. Blasphemy, I know. |
Oh, so all the XQuery Optic functions are in the op namespace, regardless what class they're associated with in SJS? How weird is that? Ours not to wonder why... What does it mean for methods that appear in more than one class, like AccessPlan.prototype.explain and PreparePlan.prototype.explain? (And friends IteratePland and ModifyPlan). Are they both supposed to reference just op:explain? What SJS function is op:explain supposed to link back to, given that there are multiple candidates? There's such a lack of symmetry between the two APIs, I kinda wonder if we should link between them at all at the function page level. Blasphemy, I know. — |
I’ll let Erik correct me, but my understanding is that certain methods only operate on certain objects, created upstream, while others can operate on just about any object. As for the XQuery API, how it maps to the JS API is a mystery to me. My job is to explain how to use these APIs, not how they were implemented. I agree that not linking between the two APIs would be fine. That’s why I offered that as an optional solution to this mess. |
Okay, sounds like we need a decision on whether to solve this in code or in content (or some combination). |
I'll abide by either, whatever is easiest. The Dude abides, man. |
Easiest for me is a content solution, but I have no idea how hard that is on your side. :) |
I do not believe this has a purely content-based solution. No amount of fiddling with the input can "teach" the ingest transform to magically generate (or not generate) the links, AFAIK. It has the bit between its teeth, and it is darned well gonna try. Gordon says he'd be happy with a way to entirely suppress the linking. Say we introduce a new content attribute like I had some other, more complicated, finer-grained suggestions, but this might be simplest for everyone. Have you any profund thoughts about this , @dmcassel ? (I have no nefarious plans for other values of |
@kcoleman-marklogic that sounds reasonable to me. Can you folks produce a zip with some link attributes for me to mess with? |
Sorry, I dropped the ball on this last week. Do you want a whole doc zip with one or two files that contain the suggested change, or will just one modified XML file do? You can |
I can work with a modified XML doc. |
I'm going to email you a suitable XML file, but you might also need this commit off the docapp branch to meaningfully test it. IDK how to get that to you gracefully; my meager git fu does not stretch very far. We cannot merge the whole docapp branch to master right now (it has 9.0 specific stuff in it). It's always possible you won't need it. I can hope, at least. |
…tion Some XQuery and SJS functions have equivalents in the other language; some don't. The link attribute gives us a way to explicitly block those that shouldn't have a link generated.
…tion (#660) Some XQuery and SJS functions have equivalents in the other language; some don't. The link attribute gives us a way to explicitly block those that shouldn't have a link generated.
@gfurbush @kcoleman-marklogic I made a commit that respects the link="none" attribute. Has no effect if the attribute isn't there, but prevents the link from being generated if the value is none. Can you pull into docapp and test? |
I have pulled these changes on to pubs. It'll be up to @gfurbush to test them out. |
Looks good. |
I thought I had already created this bug, but I don't see it.....
The auto-generated links between the optic JavaScript and XQuery functions (the link in the upper right on each page) are wrong. The problem is that the JavaScript version of the API is structured as prototype methods that doesn't conform to the same structure as our other JavaScript APIs.
I don't know if there's a fix that will auto-generate the links correctly, so it may make more sense to build in a way to either override and correct these links or suppress them altogether.
The text was updated successfully, but these errors were encountered: