-
Notifications
You must be signed in to change notification settings - Fork 12
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
RM Update artifact with a custom attribute #55
Comments
The custom attributes won't be in the rdf unless they have a value on the artifact you're retrieving. |
is th
is there any parameter in the get_rdf can be pass to obtain the tags for custom attributes? |
There's nothing special needed in get_rdf but note you won't see the attribute in the rdf unless you give the attribute a value on the artifact you're getting the rdf for, so give your attribute a value on an artifact, then get the rdf for that artifact and you'll see the value. If you give the attribute a URI then that URI will be used as the tag for the value. |
Thank you for your response, |
Apologies I haven't got back to you earlier. When you assign your custom attribute a URI then the URI is used as the XML tag for a value of that attribute in the RDF. If a custom attribute has a value on an artifact then there will be a tag in the RDF. For example if myAtt has a URI http://me.com/at/atts/myAtt then when the attribute has a value in the rdf there will be a tag like
where the namespace f2 is automatically created as If you don't assign a URI to the attribute you get something which appears more random but which can be found in the shapes, for example But as you can see, with the URI it gets a lot easier to locate a custom attribute, for example using xpath something like (not tested): attvalue_x = theartifact_x.find( ".//{http://me.com/atts/}myAtt" ) If using |
Hi, I was able to update the primary text using update artifact for a Requirement Artifact,
and I'm looking to find out how to search the tags for a custom attributes, I saw the print out of the tags, but nothing comes familiar in the available tags when "print(f"{ET.tostring(theartifact_x)=}\n")"
after
now get the artifact content and its etag
is the there a specific resource I need to sub-navigate to find out the custom attributes?
Thank you
The text was updated successfully, but these errors were encountered: