I've written a CMS which sends products to Amazon from within an accounting package but I'm struggling to find the correct ProductData information for each Amazon category. Does anyone know of any resources to get these?
Here's what I mean, its the "Tools" level I require as the ProductType can be found from the tree guides. They don't seem to always correspond with the category name.
<ProductData>
<Tools>
<ProductType>
<Hardware></Hardware>
</ProductType>
</Tools>
</ProductData>
Thanks in advance
Well one thing for sure is you can look here https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/XML_Documentation_Intl.pdf to find the links to the xsd files. Like this one : https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_1_9/Health.xsd
You can try to parse those files, you can also generate the model classes based on the definitions in the xsd.
Related
Due to a requirement in creating multiple SAS libraries from time to time in the MC, I am trying to figure out how to do this programmatically. These libraries are pointing to external databases. So far, using the available examples I was able to use the following code to create library metadata.
proc metadata in='<AddMetadata>
<Metadata>
<SASLibrary
Name="Test Library"
Desc="This is a test"
Folder="\Shared Data\Test"
Engine="DB2"
IsDBMSLibname="1"
IsHidden="0"
Libref="testlib"
IsPreassigned="0"
PublicType="Library">
</SASLibrary>
</Metadata>
<Reposid>A0000001.A849HGWS</Reposid>
<NS>SAS</NS>
<Flags>268435456</Flags>
<Options/>
</AddMetadata>
';
However this is still missing the resource template, schema name, location (folder name). Is there any way we can add these programmatically as well? Also anyway to update the access templates? Any attributes that I can assign these values to when calling proc metadata? Thanks in advance.
You can use the DATA Step function metadata_newobj("SASLibrary", to programmatically create your libraries. Check the documentation for "METADATA_NEWOBJ Function" for further examples of setting the attributes of the library via rc=metadata_setattr(luri,
Functions are ok but troublesome since you must invoke bunch of them to get desired result. XML as a template works best.
If you have access to SAS Management Console I am recommending enabling Metadata Inspector plugin.
cp -r $SASHOME/SASManagementConsole/9.4/plugins/advanced/omitoolsmc $SASHOME/SASManagementConsole/9.4/plugins/
Then in SASMC you are able to browse metadata of all objects using XML queries. Just go to Tools -> XML Metadata Interface.
Below is example XML fetched using this tool. To place this library in specific folder you need to know folder metadata id (Tree association). Same goes to associating library with a server context (DeployedComponents association) and/or DB2 server.
Of course you need only necessary tags. You can ommit empty ones.
<SASLibrary Name="DB2 Library" Desc="Library description" Engine="DB2" IsDBMSLibname="1" IsHidden="0" IsPreassigned="0" Libref="DB2LIB" PublicType="Library">
<AccessControls/>
<Aliases/>
<AliasFor/>
<Changes/>
<CustomAssociations/>
<DefaultLogin/>
<DeployedComponents>
<ServerContext Id="associated context meta id" />
</DeployedComponents>
<Documents/>
(...)
<Timestamps/>
<Trees>
<Tree Id="folder meta id"/>
</Trees>
<TSObjectNamespace/>
<UsedByPackages/>
<UsedByPrototypes/>
<UsingPackages/>
<UsingPrototype/>
<Variables/>
</SASLibrary>
In Capella, in the descriptions of my model elements, I am using hypertext links towards other elements of the model. When I generate a document with M2Doc, these links are not properly transformed/interpreted.
Example: a Capella hypertext link towards the "Cabin Screen" model element...
<p>Link:</p>
<p>Cabin Screen</p>
... becomes an hypertext link with the following address in the generated Word document:
hlink://11e922f1-192b-43a5-9060-f935c26998a5/
But there is no way to "follow this link":
Resulting link in Word & Impossible navigation
What I need to achieve is to have the original link transformed in a bookmark reference (I have a bookmark for this element somewhere else in my document)
{REF 11e922f1-192b-43a5-9060-f935c26998a5 \h }
I was wondering whether one service allows to automatically transform these links in bookmark references (BookmarkRef)? If not, has this request been raised already?
This replacement depend on the way you are creating your bookmark IDs. If you are using the same way as the sample templates provided with the M2Doc IFE project, you can use the replaceLink() service. This service is only available if you install M2Doc Capella extensions. You can use it like this:
myCapellaElement.description.fromHTMLBodyString().replaceLink(myCapellaElement)
Otherwise you can have a look at the implementation to implement your own version.
I have a topic, which only contains some metadata (childs of prolog and some custom elements too) of the documentation. The contents of these elements is displayed in headers and footers in the acutal PDF output.
My problem: now the referred topic itself included in the pdf as an empty chapter.
Setting the processing-role to resource-only or filtering the topic does not solve the problem, as the content of the elements is needed in the further steps of the transformation (headers, footerst ect..)
My best guess is to somehow exclude this one topic and the needless page sequence based on its ID with..
.. adding some attributes in a custom xsl template?
.. modification of topic processing?
.. an obvious method that didn’t occur to me?
but I’m a beginner, so a little guidance would be nice.
Currently using:
DITA-OT 2.1; Oxygen 17.1; Bookmap spec.; XSL FO based transformations;
Thanks in advance!
Maybe instead of keeping that content inside the topic, you could keep it inside the main DITA Map, maybe using some DITA "data" elements like:
<map>
<title></title>
<topicmeta>
<data name="d1" value="v1"/>
</topicmeta>
Anyway if you plan to continue with having a separate topic, maybe you can set on that topic an "outputclass='filtered'" attribute and then use Oxygen's Find/Replace in Files to search in the folder "DITA-OT/plugins/org.dita.pdf2" for "bookmap/chapter". You probably need to find the XSLT templates which process DITA "chapter" elements for the table of contents, bookmarks area and for the main document and add a [not(#outputclass='hidden')] condition to them so that they skip that topic.
As I experiment more and more with making my own Open Data Tables for YQL I find what might be some gaps in the documentation. As I'm a hands-on learner and like to understand everything I use I probe these gaps to try to learn how everything works.
I've noticed that in the XML format for Open Data Tables, there is a <urls> "array" which usually contains just a single <url> element though sometimes there is no <url>. Here's the beginning of a typical ODT XML file:
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd" https="true">
<meta>
<author>Paul Donnelly</author>
<documentationURL>http://developer.netflix.com/docs/REST_API_Reference#0_52696</documentationURL>
</meta>
<bindings>
<select itemPath="" produces="XML">
<urls>
<url env="all">http://api.netflix.com/catalog/titles/</url>
</urls>
But I can't seem to find in the documentation whether it can ever contain more than one. I can't find any examples that do but when I try adding more than one everything works and no errors are thrown, though I also can't find any way to access the <url> elements beyond the first one.
Is there any use for the url/urls fields being an XML array? Is there any way to make use of more than one url here? Or is it just a quirk of the format that has no real reason?
Is there any use for the url/urls fields being an XML array?
Is there any way to make use of more than one url here?
The <url> elements can have an env attribute. This env attribute can contain all, prod, int, dev, stable, nightly, perf, qaperf, gamma or beta.
When the table is executed, the current environment (the YQL environment, not the more familiar environment file) is checked and the first matching <url> (if any) is used. If no matching env is found (and there is no all, which is pretty self-descriptive) then an error will be issued; for example, "Table not defined in this environment prod".
Note that for public-facing YQL, the environment is prod; only prod and all make sense to be used in your Open Data Tables.
Or is it just a quirk of the format that has no real reason?
Not at all.
I assume that this information is "missing" from the online documentation purely because it is only useful internally within Yahoo!, but equally it could just be another place where the docs are somewhat out-of-date.
Finally, none of the 1,100 or so Community Open Data Tables specify more than one <url>, and only a handful (55) make use of the env attribute (all using the value all).
I'm working part of a project that needs to display a .xml file with .xsl files.
Here's part of the code:
FILE_PATH = "myxsl.xsl"
...
Label content = new Label("content",xmlContent);
content.setEscapeModelStrings(false);
content.add(new XsltTransformerBehavior(FILE_PATH));
add(content);
...
Currently the page works if I use only one .xsl file. However, because the .xsl files I need to deal with can be really long, they are separated into several components.
for example, I will have
mymain.xsl, head.xsl, tables.xsl
the mymain.xsl has inclusion of the other like this
<xsl:include href="head.xsl"/>
<xsl:include href="tables.xsl"/>
I tried to set FILE_PATH to mymain.xsl, but it didn't work. The program can find mymain.xsl but cannot compile the stylesheet because it cannot find head.xsl and tables.xsl
I've been searching for a long time but still have no clue how to do this. Really appreciate any help. Thanks in advance.
I looked at the documentation of XsltTransformerBehavior, and it looks like it doesn't expose the functionality to set a custom URI resolver (which is basically what you want to do).
However, in the case that no-one else has a better solution, I can propose a workaround: Write an XSLT that merges your XSLT files into one file. See here for an XSLT that does this. If you're using Maven as build system, you can do this automatically in the generate-resources phase using the transform goal of the Maven XML Plugin. You can then associate the XsltTransformerBehavior with the single-file XSLT which will be available at run-time.