Job Opening: DITA - XML - XSLT at Mentor Graphics
Mentor Graphics has the following open postion:
Title: Technical Publications Infrastructure Engineer (XML - XSLT - DITA)
Position based: Wilsonville, Oregon
Please follow the link to the job description: http://ch.tbe.taleo.net/CH08/ats/careers/requisition.jsp?org=MENTOR&cws=1&rid=1023
I would have applied myself, but unfortunatley someone made it so you can see other people's post history.
Similar Messages
-
Opening an XML Plan File to Graphical Format in SSMS
Here is the BOL link on saving & loading .xmlplan files:
http://technet.microsoft.com/en-us/library/ms190646.aspx
I renamed the downloaded xml file in the following thread to .xmlplan. Still it opens up in XML mode, not in graphics:
http://social.msdn.microsoft.com/Forums/en-US/f5aa97f2-ee39-4f4c-b190-5e3dd25adbfc/hierarchyid-indexingperformance?forum=transactsql
https://www.dropbox.com/s/mmjthlfryvsr4l4/Execution%20plan.xml
Thanks.
Kalman Toth Database & OLAP Architect
SELECT Video Tutorials 4 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012Hello Kalman,
I changed the file extension from .xml to .sqlplan then the XML plan is displayed in graphics format in SSMS 2014 CTP2 without any problem
Are you using .xmlplan ? It might be the problem, .sqlplan works successfully.
SQL Server, SQL Server 2012 Denali and T-SQL Tutorials -
[svn] 3663: Dita xml and xslt support for SkinStates
Revision: 3663
Author: [email protected]
Date: 2008-10-15 13:04:27 -0700 (Wed, 15 Oct 2008)
Log Message:
Dita xml and xslt support for SkinStates
Bugs: SDK-17166
QA: Yes
Doc: No
Tests: checkintests
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-17166
Modified Paths:
flex/sdk/trunk/asdoc/templates/class-parts.xslt
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja vahttp://docs.oracle.com/javaee/1.4/tutorial/doc/JAXPXSLT6.html
-
Frame XSLT processing screws graphics mappings
Hi,
We have encountered strange behavior in FM 8. Our XML has element for graphics with attribute set that matches 100% to frame graphic properties, like:
image position="below" href="graphic.jpg" etc..
rw-rules maps position to position property and href to file property etc..
If I open the file w/o using frame's XSLT in the middle frame behaves as expected (like 7.x did).
We had a small and simple xsl stylesheet (almost pass-through) and if that was added in structapps the results were odd in frame:
- href got mapped to file property, but also appeared in structure view!. Since href was a property, edd had no counterpart. Href was shown as invalid in structure view.
Also, frame no ignored position totally, all graphics got the default "At insertion point" value. This happened even if I tried to force the property to "below" in rw-rules.
All this worked in fm 7.x.
Has anyone noticed similar behaviour?. I'd consider this a serious bug.
BR, MarttiPlease click my name (at the forum's web page), there you'll find a link to my homepage, go to "Kontakt" to find my email address.
My domain is cap-studio.de, please use this with my initials 'mmh' before the ubiquitous at sign.
- Michael Müller-Hillebrand -
Problem Working With Framemaker 9 Dita XML Files in Framemaker 10
I just upgraded to Framemaker 10. I am encountering a number of problems when I try to work with my Dita XML help topics, which were last saved in Framemaker 9 format.
1. Using the Default Dita Template
When I open one of my documents in Framemaker 10, the Dita 1.2 template ditabase.fm is automatically applied. Everything seems fine. But then when I convert the XML to Eclipse help (which is essentially html, so we're going from XML to HTML) using Dita Open Toolkit ant scripts, I see this message:
[pipeline] [DOTJ013E][ERROR] Failed to parse the referenced file 'html\c_licensing.xml' due to below exception. Please correct the reference base on the exception message.
[pipeline] c_licensing.xml Line 25:Attribute "xmlns:ditaarch" must be declared for element type "dita".
I then opened the xml file in a text editor, and I saw this on line 25:
<dita xmlns:ditaarch = "http://dita.oasis-open.org/architecture/2005/">
Line 25 looks fine to me. Am I missing something?
2. Switching to a 1.1 Dita Template
I tried to work around the above problem. In Framemaker, I tried to set a different structured application as the default one. I closed all files and chose the default Dita 1.1 structured application (it defaults to the Dita 1.1. Composite app.)
Then I tried to open my file: I got this message inside Framemaker:
"Validation of XML failed. Continue?
Error at [FILE PATH], line 25, char 72, Message: Attribute '{http://www.w3.org/2000/xmlns/}ditaarch' is not declared for element 'dita'
Sounds familiar, doesn't it?
I switched from the default Dita 1.1. Composite structured application to the Dita 1.1. Topic structured application. Then I dirtied the source file and saved it. The messages I got in FrameMaker log window included the one above, plus I got a variety of Unknown Element messages, things like this:
Unknown element dita,
unknown element concept,
various attributes are not declared for concept,
unknown element conbody.
If I switch back to the Dita 1.1 Composite application all of these messages diappear except for this one:
Attribute '{http://www.w3.org/2000/xmlns/}ditaarch' is not declared for element 'dita'
My ant conversion scripts from the Dita Open Toolkit are still unable to process this file. They give the same message as is listed in (1) above and the file is not converted to HTML.
Can anyone help me with this problem? I've also posted this question to the Dita Users Group on Yahoo Groups. If I get an answer in one place, I'll post it in the other.
Thanks,
Nina P.I really appreciate all the help you are providing with this, Scott. I tried your latest suggestions. Here's what happened:
Application Mappings:
I figured out how to add my "BigPage" structured application to the Applications Mappings dialog. I made a new "BigPage" mapping type, then figured out the non-intuitive part: how to add my individual BigPage topic types to it. I closed and reopened FrameMaker opened my test document, and, as before (before I did the application mappings) I saw my BigPage applications listed in the Structure Tools > Set Structured Application drop-down. I selected the appropriate application (in this case it was DITA1.1-BigPage-Reference-FM and clicked the "Set" button.
It is at this point in Framemaker 9 (and also once, in FrameMaker 10, early in this process, but I haven't been able to replicate it since) that the page size would change to tabloid size, indicating that the document was using the template from the BigPage reference structured application, not the regular DITA1.1 reference application. But this did not happen.
I tried saving the document, closing it, and reopening it. Once again the default structured application assigned to that document was "reset" to DITA1.1-Reference-FM. But the fact that the page size did not immediate refresh to tabloid size told me that although I did select the BigPage application in the drop-down, it wasn't being applied.
Public IDs:
The public ID in my test reference XML file is: <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd" [
The four public IDs in the DITA1.1-BigPage-Reference-FM entry in structapps.fm (in the Entity Locations section) are:
-//OASIS//DTD DITA Reference//EN
-//IBM//DTD DITA Reference//EN
-//OASIS//DTD DITA Composite//EN
-//IBM//DTD DITA Composite//EN
Do you see anything wrong with the above? .
Directory Structure:
Maybe I cloned the application incorrectly? Here's what I did:
1. In C:\Program Files (x86)\Adobe\AdobeFrameMaker10\Structure\xml, I copied the folder called DITA and pasted it into the same directory. I renamed this folder DITA-BigPage
2. Inside DITA-BigPage, I opened the app folder. Inside each subfolder in app, DITA-Reference-FM, for example, I opened the edd file in Framemaker. In this case, the edd file name was reference.edd.fm.
3. I edited the top line of reference.edd.fm. It originally said:
Structured Application: DITA1.1-Reference-FM.
I changed it to say:
Structured Application: DITA1.1-BigPage-Reference-FM
4. I saved the EDD file. Then I opened the template file in the same folder. It was called: reference.template.fm.
5. In reference.template.fm, I first changed my page size: Format Menu > Page Layout > Page Size > Tabloid > Set.
6. Then I imported the element definitions from the corresponding EDD file: File > Import > Element Definitions > reference.edd.fm > Click Import > Click OK to dismiss verification message.
7. I repeated the above process for all topic-type folders. For the maps types, I did not change the page size, as these will never display as topics in my online help. I did nothing to the dtd folder.
8. Once all this was done, I opened structapps.fm. I did the following to all Dita1.1 elements in the structure tree.
Selected the Dita 1.1 XMLApplication element, for instance, the one named Dita1.1-Reference-FM, copied it, and pasted it underneath the original element.
The original first few lines in the clone looked like this:
Application Name: DITA1.1-Reference-FM
Template: $STRUCTDIR\xml\DITA\app\DITA-Reference-FM\reference.template.fm
DTD: $STRUCTDIR\xml\DITA\app\dtd\reference.dtd
Read/write Rules: $STRUCTDIR\xml\DITA\app\DITA-Reference-FM\reference.rules.fm
DOCTYPE: reference
I changed these lines to look like this, using your suggestion to create a variable for the first part of the URLs to enable speed and accuracy:
Application Name: DITA1.1-BigPage-Reference-FM
Template: $STRUCTDIR\xml\DITA-BigPage\app\DITA-Reference-FM\reference.template.fm
DTD: $STRUCTDIR\xml\DITA-BigPage\app\dtd\reference.dtd
Read/write Rules: $STRUCTDIR\xml\DITA-BigPage\app\DITA-Reference-FM\reference.rules.fm
DOCTYPE: reference
I also changed the "Filename" URLs in the "Entity Locations" section of this XMLApplication clone from $STRUCTDIR\xml\DITA\app\ to $STRUCTDIR\xml\DITA-BigPage\app\. Applying the "BigPage" variable I'd created for this purpose made this go quickly.
Finally, after this didn't work the first few times I tried it, I got suspicious that the structapps.fm file in my AppData folder (in my case, it was in the Roaming subfolder under the usual Adobe directories) was overriding the modified structapps.fm file in the Framemaker program directory so I replaced the one in AppData (it had all the original settings) with my modified version. This had no effect, unfortunately.
That was my process. After doing the above, the Dita1.1-BigPage applications all listed in the Set Structured App drop-down. They just didn't work,when applied to my XML documents. Nor did the application "remember" what structured application I had set when I opened a new xml document or closed/reopened the current document or closed/reopened the application. Did I place the directories correctly for Framemaker 10? This is the way I did it for FrameMaker 9 and it worked successfully.
As much as I'd love to solve this mystery, I've thought of a workaround I can fall back on that doesn't involve using a cloned application. I will change the page size of a few of the original Dita1.1 sturctured application templates to tabloid size, but leave the Topic structured application at letter size. I'll then apply the Topic structured application to my PDFs and use the others for my help topics. I'll set this up now. If this doesn't work, then I'll know there's a much bigger problem at the base of this, perhaps even something to do with changing page sizes in templates. -
HELP: JSP + XML + XSLT = HTML?
Hello, all.
I am trying out Weblogic 6 and I am trying to get the JSP + XML + XSLT =>
HTML chain working.
I am coming from using Orion and SAXON.. and in that situation I had a JSP
that contained XML tags... they were filled in at runtime and then using
Servlet-Chaining was passed along to the SAXON XSLT Processer. SAXON checked
for the inline XSL specified and then used that to transform the document
into HTML.
It worked well, but there were some other features missing/not documented
that we now need.
With Weblogic I am trying to use the XSLT Tag Library that comes with the
distribution, but it seems to be very finicky. I followed the directions and
I got it to do a sort of roundabout transformation. But it doesn't seem to
work quite right.
The best I can get is the following:
I have an 'xslt' directory url-pattern-mapped to xslt.jsp (as instructed)...
but can't figure out how to specify the xsl file on-the-fly... that is, if I
don't hard-code the XSL file in the x:xslt element in the xslt.jsp it
complains about some XML file not having a root element.
Ideal situation:
1. I have a JSP that includes XML elements.
2. It is filled from a database at runtime and specifys (using a PI) what
XSL stylesheet it is to be processed with.
3. Somehow (fingers crossed) the XML is processed and transformed into HTML
by the appropriate XSL file.
I think I am mostly stuck moving between steps 2 and 3.
Can anyone give me some hints? Are there some Weblogic specific
elements/tags that I have to include in the XML file that Weblogic will
catch and re-direct to the XSL Parser?
Please, anyone, if you have some information, I would much appreciate it.
Dylan Parker
PS - I apologize for the cross-post, I hope it doesn't cause too much
traffic.Craig,
I've since discovered how to do it with the WL Taglibrary... and have
moved on =)
It has to do with the EXTREMELY BADLY documented x:xml tag that can
appear within the x:xslt tag body...
So the WL Tag Library allows something like the following.
(Please note, angled brackets are omitted in this post to prevent html
parsing)
[x:xslt stylesheet="sheet.xsl"]
[x:xml]
Here is the XML to run the sheet on.
This should have all relevant XML syntax: the PIs, the doctype,
root elements etc...
[x:xml]
[x:xslt]
And that DOES work. But not very well. WL, a little prematurely
incorporated versions 1.2 of Xerces and Xalan in their product -- and
these versions have some irritating bugs.
Also -- There tag library doesn't copy the source XML across as UTF-8
.. so a lot of the Japanese I have embedded there (from a DB) gets
mangled somewhere in their code...
AND -- If you hammer a little bit on an JSP/XML that uses the WL Tag
Library (eg clicking refresh lots of times in IE)... I get huge
amounts of irritating exceptions appearing in the log files.
NullPointerExceptions
XSL Parsing Exceptions
XML Parsing Exceptions
but completely unpredictably...
In my eyes.. the WL XML/XSL Tag Library using the incorporated and
untouchable Xalan and Xerces (v1.2) is virtually unusable.
What a pain.
BUT! Apache offers a similar OPEN SOURCE XSL Tag Library available
here:
http://jakarta.apache.org/taglibs/doc/xsl-doc/intro.html
And it uses the standard, non-weblogic-incorporated, Xerces and Xalan
(which means you can provide whatever version you want).. and it works
impressively well.
It has almost identical performance as the WL Taglib, and without all
of the bizarre exceptions being thrown.
And it does proper passing of the character encoding type!
If only the taglib did caching though =(
The performance hit over pure JSP is huge. Almost two orders of
magnitude. On my desktop box I can get around 500Requests/Sec if I am
returning HTML direct from a JSP... while if I produce XML that gets
processed by XSL into HTML the Requests/Sec drops to 5!!!!
Caching. Caching. And more Caching. A lot of DiskIO is going on with
the XML/XSL/XHTML chain of events.
I hope this helps!
I'd be curious as to what you find out as well.
Dylan Parker
On 5 Mar 2001 07:20:00 -0800, "Craig Macha"
<[email protected]> wrote:
>
Yep, I feel Dylan's pain.
I am trying to accomplish the same thing. A JSP page generating
dynamic XML content and then utilizing an XSLT stylesheet to transform
all the content into XHTML.
Does anyone have some examples that show exactly how to accomplish
this? Can I do this with WLS and the XML taglib that comes with
it? Or do I have to move on to something like Cocoon to get this
capability?
Any insight would be greatly appreciated.
Thanks,
Craig Macha
"Dylan Parker" <[email protected]> wrote:
Hello, all.
I am trying out Weblogic 6 and I am trying to get the
JSP + XML + XSLT =>
HTML chain working.
I am coming from using Orion and SAXON.. and in that situation
I had a JSP
that contained XML tags... they were filled in at runtime
and then using
Servlet-Chaining was passed along to the SAXON XSLT Processer.
SAXON checked
for the inline XSL specified and then used that to transform
the document
into HTML.
It worked well, but there were some other features missing/not
documented
that we now need.
With Weblogic I am trying to use the XSLT Tag Library
that comes with the
distribution, but it seems to be very finicky. I followed
the directions and
I got it to do a sort of roundabout transformation. But
it doesn't seem to
work quite right.
The best I can get is the following:
I have an 'xslt' directory url-pattern-mapped to xslt.jsp
(as instructed)...
but can't figure out how to specify the xsl file on-the-fly...
that is, if I
don't hard-code the XSL file in the x:xslt element in
the xslt.jsp it
complains about some XML file not having a root element.
Ideal situation:
1. I have a JSP that includes XML elements.
2. It is filled from a database at runtime and specifys
(using a PI) what
XSL stylesheet it is to be processed with.
3. Somehow (fingers crossed) the XML is processed and
transformed into HTML
by the appropriate XSL file.
I think I am mostly stuck moving between steps 2 and 3.
Can anyone give me some hints? Are there some Weblogic
specific
elements/tags that I have to include in the XML file that
Weblogic will
catch and re-direct to the XSL Parser?
Please, anyone, if you have some information, I would
much appreciate it.
Dylan Parker
PS - I apologize for the cross-post, I hope it doesn't
cause too much
traffic. -
Hi All
I'm want to dip my toe into the world of XML/XSLT development
to help with
job applications. Seems there's a lot of companies asking for
this.
I've been developing ASP applications for a number of years,
but i've never
looked at XML, etc...
Can anyone provide a strating point, examples, etc? I'm also
looking to
learn .NET too (think i have a mountain to climb).
I've been using Access database for my applications but also
need to expand
by using MS SQL on my local machine.
Any ideas wher to start?
Hope someone can point me in the right direction - Thanks in
Adance
Andy> Can anyone provide a strating point, examples, etc? I'm
also looking to
> learn .NET too (think i have a mountain to climb).
And at the top of that mountain is a pile of .net XML
applications. I can't
say that's the motherland of software development, but, yea,
it probably
pays good. ;o)
> Any ideas wher to start?
Well, if you start using asp.net 2.0, a lot of the built-in
controls
leverage XML and XSLT, so you'll begin to get your hand dirty
just going
through the basic ASP.net 2.0 tutorials.
-Darrel -
How to open and XML file?
Does anyone have a way on Mac to open an XML file for viewing. This can be done with WIN Excel and XML toolkit but doesn't exist for Mac Excel in Office 2008. I can open with TextEdit but would like to see the info with headers and cells without all the XML coding. Numbers 09 can't open it at all.
Numbers uses XML to build the description of the documents but it's not an XML editor.
A simple search in Google with the intricate key string xml editor AND mac return numerous interesting links.
Yvan KOENIG (VALLAURIS, France) vendredi 9 octobre 2009 11:33:27 -
I've discovered some very strange behaviour in Excel which seems to be contrary to that documented in the Open Office XML specification (OOXML). I couldn't find a way to report bugs against Excel, so I thought I'd try to explain the issue here.
In short it seems that Excel is removing, and incorrectly re-indexing the metadata I programatically associate with cells.
First, a summary of the relevant parts of the specification:
From OOXML 18.9: There are two types of metadata: "cell metadata" and "value metadata".
Cell metadata follows the cell as it moves. Value metadata follows the value through formulae etc.
From OOXML 18.3.1.4: The c (cell) element has cm and vm attributes which are both documented as "The zero-based index of the [cell|value] metadata...in the Metadata Part"
From OOXML 18.9.17: The valueMetadata is "a collection of block element that each define the value metadata for a particular cell". "Cells in the workbook index into this collection".
The valueMetadata contains bk elements which in turn contain rc (metadata record) elements
From OOXML 18.9.15: rc elements have t (type index) and v (value index) attributes. t is a 1-based index into metadataTypes and v is a 0-based index into the futureMetadata element which matches the name of the metadata type.
Here's an example of what this might look like:
<c vm="0"> <!-- vm points to the first bk inside valueMetadata below -->
<x:valueMetadata>
<x:bk>
<x:rc t="1" v="0" /> <!-- t points to the first metadataType below. v points to the first bk in the futureMetadata below (whose name matches the metadataType to which t points) -->
</x:bk>
</x:valueMetadata>
<x:metadataTypes>
<x:metadataType name="MyMetaType" ... /> <!-- name dictates which futureMetadata valueMetadata's v attribute indexes into -->
</x:metadataTypes>
<x:futureMetadata name="MyMetaType" ...>
<x:bk>
<x:extLst>
<x:ext xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main" uri="http://example.com/extension" p5:value="test value" xmlns:p5="http://example.com/extension" />
</x:extLst>
</x:bk>
</x:futureMetadata>
The Problem
From what I can tell, for values of n > 2, if you associate n cells with metadata, Excel will drop the last piece of metadata, and the one at index 1, and it will do so silently. The indices are then 0..n-3, and the association for all but the first (0
index) will be wrong. This renders the future metadata totally useless.
For n == 1, Excel just removes the last piece of metadata (index 1). If we try 1-based indexes for the vm attribute on the c element, we get different behaviour. This may not be relevant as it is contrary to the specification, but the slightly better behaviour
might indicate an off-by-one error:
n
Deleted Indices (0-based) when using 0-based indices
Deleted Indices (0-based) when using 1-based indices
1
0
None
2
1
1
3
1,2
1
4
1,3
1
5
1,4
1
6
1,5
1
Demonstrating the Problem
I have some example code[1] that demonstrates the problem. You will need a file called test.xlsx with cells A1..C2 populated.
Compile the source as AddMetadata.exe then run with the test file as the only parameter:
> AddMetadata.exe test.xlsx
You can look at test.xlsx in Excel, Visual Studio (with the Open XML Package Editor Power Tool for Visual Studio 2010) or the Open XML SDK 2.0 Productivity Tool for Microsoft Office. Looking at the file before and after running AddMetadata.exe you should
be able to reproduce the behaviour documented above.
Summary
It would be good to know if this is really an Excel bug or whether we're doing something wrong / unsupported. Any insight would be very much appreciated.
[1] The Example code:
namespace AddMetadata
using System;
using System.Linq;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
public class Program
// The cells to associate with metadata
private readonly static CellSpec[] CellSpecs = new[]
new CellSpec{ Sheet = "Sheet1", Column = "A", Row = 1 },
new CellSpec{ Sheet = "Sheet1", Column = "B", Row = 1 },
new CellSpec{ Sheet = "Sheet1", Column = "C", Row = 1 },
new CellSpec{ Sheet = "Sheet1", Column = "A", Row = 2 },
new CellSpec{ Sheet = "Sheet1", Column = "B", Row = 2 },
new CellSpec{ Sheet = "Sheet1", Column = "C", Row = 2 },
private static readonly uint NumCells = (uint)CellSpecs.Length;
private const string SPREADSHEET_ML_NS = "http://schemas.openxmlformats.org/spreadsheetml/2006/main";
private const string METADATA_TYPE_NAME = "MyMetaType";
private const string EXTENSION_URI = "http://example.com/extension";
public static void Main(string[] args)
if (args.Length != 1)
Console.Out.WriteLine("AddMetadata <doc.xslx>");
Console.Out.WriteLine(" Adds metadata to the specified document to demonstate some strange Excel behaviour");
Environment.Exit(1);
try
var doc = SpreadsheetDocument.Open(args[0], true);
StripMetadata(doc);
AddMetadata(doc);
AddMetadataType(doc);
AddFutureMetadata(doc);
AddMetadataRecords(doc);
AssociateCellsWithMetadata(doc);
doc.WorkbookPart.Workbook.Save();
doc.Close();
catch(Exception e)
Console.Out.WriteLine(e);
/// <summary>
/// Strip any existing metadata.
/// </summary>
/// <param name="doc">The document</param>
private static void StripMetadata(SpreadsheetDocument doc)
var wbPart = doc.WorkbookPart;
var cellMetadataPart = wbPart.GetPartsOfType<CellMetadataPart>().FirstOrDefault();
wbPart.DeletePart(cellMetadataPart);
/// <summary>
/// Add basic metadata part structure.
/// </summary>
/// <param name="doc">The document</param>
private static void AddMetadata(SpreadsheetDocument doc)
doc.WorkbookPart.AddNewPart<CellMetadataPart>();
doc.WorkbookPart.CellMetadataPart.Metadata = new Metadata { MetadataTypes = new MetadataTypes() };
/// <summary>
/// Add the metadata type used by all the metadata we're adding
/// </summary>
/// <param name="doc"></param>
private static void AddMetadataType(SpreadsheetDocument doc)
var metadata = doc.WorkbookPart.CellMetadataPart.Metadata;
var metadataType = new MetadataType
Name = METADATA_TYPE_NAME,
Assign = false,
CellMeta = false,
ClearContents = false,
ClearAll = false,
ClearComments = true,
ClearFormats = true,
Coerce = false,
Copy = true,
Delete = false,
Edit = true,
Merge = true,
MinSupportedVersion = 0U,
PasteAll = true,
PasteBorders = false,
PasteColWidths = false,
PasteComments = false,
PasteDataValidation = false,
PasteFormats = false,
PasteFormulas = false,
PasteNumberFormats = false,
PasteValues = true,
RowColumnShift = true,
SplitAll = false,
SplitFirst = false
metadata.MetadataTypes.AppendChild(metadataType);
/// <summary>
/// Add future metadata blocks which contain the actual metadata for each cell.
/// They are referenced by the metadata records.
/// </summary>
/// <param name="doc">The document</param>
private static void AddFutureMetadata(SpreadsheetDocument doc)
var metadata = doc.WorkbookPart.CellMetadataPart.Metadata;
var futureMetadata = metadata.AppendChild(new FutureMetadata());
futureMetadata.Name = METADATA_TYPE_NAME;
futureMetadata.Count = NumCells;
// Future metadata area
for (var i = 0; i < NumCells; i++)
// The metadata for each cell will be single FutureMetadataBlock containing an extension list with a single extension.
FutureMetadataBlock futureMetadataBlock = futureMetadata.AppendChild(new FutureMetadataBlock());
ExtensionList extLst = futureMetadataBlock.AppendChild(new ExtensionList());
Extension ext = extLst.AppendChild(new Extension());
ext.Uri = EXTENSION_URI;
ext.AddNamespaceDeclaration("x", SPREADSHEET_ML_NS);
ext.SetAttribute(new OpenXmlAttribute("value", ext.Uri, string.Format("test value {0}", i)));
/// <summary>
/// Add metadata records which point to each future metadata block.
/// They are in turn referenced by the cells.
/// </summary>
/// <param name="doc">The document</param>
private static void AddMetadataRecords(SpreadsheetDocument doc)
var metadata = doc.WorkbookPart.CellMetadataPart.Metadata;
// Value metadata area
ValueMetadata valueMetadata = metadata.AppendChild(new ValueMetadata());
for (uint i = 0; i < NumCells; i++)
// Type is 1-indexed, index into future metadata is 0-indexed
var metadataBlock = valueMetadata.AppendChild(new MetadataBlock());
var metadataRecord = metadataBlock.AppendChild(new MetadataRecord());
metadataRecord.Val = i;
metadataRecord.TypeIndex = (uint)1;
/// <summary>
/// Associate existing cells with existing metadata.
/// </summary>
/// <param name="doc">The document</param>
private static void AssociateCellsWithMetadata(SpreadsheetDocument doc)
for (uint i = 0; i < CellSpecs.Length; i++)
var cellSpec = CellSpecs[i];
var cell = GetCell(doc, cellSpec.Sheet, cellSpec.Column, cellSpec.Row);
if (cell == null)
throw new ArgumentException(string.Format("Cell {0} not found in row {1} of sheet {2}", cellSpec.Column, cellSpec.Row, cellSpec.Sheet));
cell.ValueMetaIndex = i;
/// <summary>
/// Get a cell given the document, sheet name, column name and row index.
/// </summary>
/// <param name="doc">The document</param>
/// <param name="sheetName">The sheet name</param>
/// <param name="columnName">The column name</param>
/// <param name="rowIndex">The row index</param>
/// <returns>The cell</returns>
private static Cell GetCell(SpreadsheetDocument doc, String sheetName, String columnName, uint rowIndex)
var row = GetRow(doc, sheetName, rowIndex);
if (row == null)
throw new ArgumentException(string.Format("Row '{0}' not found", rowIndex));
return row.Elements<Cell>().Where(c => c.CellReference.Value.StartsWith(columnName)).FirstOrDefault();
/// <summary>
/// Get a worksheet part by sheet name.
/// </summary>
/// <param name="document">The document</param>
/// <param name="name">The sheet name</param>
/// <returns>The worksheet part</returns>
private static WorksheetPart GetWorksheetPartByName(SpreadsheetDocument document, string name)
// Get Sheet by name from Sheets in Workbook
var sheet = document.WorkbookPart.Workbook.GetFirstChild<Sheets>().Elements<Sheet>().Where(x => x.Name == name).FirstOrDefault();
// Lookup WorksheetPart by Id
return sheet == null ? null : (WorksheetPart)document.WorkbookPart.GetPartById(sheet.Id.Value);
/// <summary>
/// Get a row given the document, sheet name and row index.
/// </summary>
/// <param name="doc">The document</param>
/// <param name="sheetName">The sheet name</param>
/// <param name="rowIndex">The row index</param>
/// <returns>The row</returns>
private static Row GetRow(SpreadsheetDocument doc, String sheetName, uint rowIndex)
var worksheetPart = GetWorksheetPartByName(doc, sheetName);
if (worksheetPart == null)
throw new ArgumentException(string.Format("Sheet '{0}' not found", sheetName));
return worksheetPart.Worksheet.GetFirstChild<SheetData>().Elements<Row>().Where(r => r.RowIndex == rowIndex).First();
struct CellSpec
public string Sheet;
public string Column;
public uint Row;If you create a metadatatype with a single metdata block, and you reference that in your vm/cm cell attribute using a *one* based index, Excel seems to see the link and it honors it when saving the spreadsheet.
So, I ended up with something like:
<c ... cm="1"/> (I'm dealing with cell metadata, but the concept is equivalente to value metadata)
<metadataTypes count="1">
<metadataType name="MyMetaType" .../>
</metadataTypes>
<futureMetadata count="1" name="MyMetaType">
<bk>
<extLst><ext
uri="http://example" xmlns:x="http://example"><x:val>87</x:val></ext></extLst>
</bk>
</futureMetadata>
<cellMetadata count="1">
<bk><rc
t="1" v="0"/></bk> <!-- this is what gets referenced as cm=1 on the cell -->
</cellMetadata>
Hope this helps. -
Download to application server using job open/close
Hello people,
Currently I am using open/close dataset to download to the application server automatically. What I do here is submit a program execute in background when the report is done the report is automatically downloaded to the application server.
My problem now is that I want to use job open/close. With this, unfortunatley, my current method of open/close dataset will be unsuable to download to application server once the background job is done.
My question is, is there a way for me to automatically download a file to the application server using the job open/close method?
Thank you so much and take care.<b>Hi,
What you can do is to write a report program that downloads the data to the file on the app server.
Now, you can use the JOB_OPEN and JOB_CLOSE and submit this program in the background which will write the file.
Regards,
Ravi</b>
So what you are saying is that I create two programs, where the job open/close program is the one I will run?
Problem is that I plan to get the values of the selection-options from the original program using the program with the job open/close. How will that work.
Thanks -
How to open a XML file in internet explorer from labview
I need to open the xml file and see the content in the internet explorer through labview. clicking the button in labview front panel i need to see the same view as we double click the xml file as it open in internet explorer .
Hi parthipan,
you can use the "Open URL in Default Browser.vi".
Mike -
Error while opening the XML file
Hi all,
i'am trying to download data from internal table to XML file with root node and its
corresponding child nodes.i have written the program in this way.
tables: mara.
include bcciixml_decl.
include bcciixml_impl.
parameters: p_matnr like mara-matnr.
start-of-selection.
data: piXML type ref to if_ixml,
pDocument type ref to if_ixml_document,
pStreamFactory type ref to if_ixml_stream_factory,
pIStream type ref to if_ixml_istream,
pParser type ref to if_ixml_parser,
pNode type ref to if_ixml_node,
pText type ref to if_ixml_text,
string type string,
count type i,
index type i,
totalSize type i,
dsn(40) type C,
xstr type xstring.
types: begin of it_mara,
matnr like mara-matnr,
ernam like mara-ernam,
aenam like mara-aenam,
vpsta like mara-vpsta,
end of it_mara.
data: itab_mara type table of it_mara.
select matnr ernam aenam vpsta from mara into table itab_mara where
matnr = p_matnr.
types: begin of xml_line,
data(256) type X,
end of xml_line.
data: xml_table type table of xml_line.
parameters: filename like rlgrap-filename.
pixml = cl_ixml=>create( ).
*-- create the initial document
pDocument = pixml->create_document( ).
pStreamFactory = pixml->create_stream_factory( ).
*-- create an input stream for the table
*pIStream = pStreamFactory->create_istream_itable( table = xml_table
size = totalSize ).
pParser = piXML->create_parser( stream_factory = pStreamFactory
istream = pIStream
document = pDocument ).
data: pOStream type ref to if_ixml_ostream.
pOStream = pStreamFactory->create_ostream_itable( table = xml_table ).
call method pDocument->render( ostream = pOStream ).
*-- how many bytes were written to the table?
totalSize = pOStream->get_num_written_raw( ).
*-- write the XML document back to the frontend
concatenate filename '.out' into filename.
condense filename no-gaps.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = totalSize
FILENAME = filename
FILETYPE = 'BIN'
TABLES
DATA_TAB = itab_mara
EXCEPTIONS
OTHERS = 11
IF SY-SUBRC <> 0.
ENDIF.
*-- print the whole DOM tree as a list...
pNode = pDocument.
perform print_node using pNode.
FORM print_node *
form print_node using value(pNode) type ref to if_ixml_node.
data: indent type i.
data: pText type ref to if_ixml_text.
data: string type string.
indent = pNode->get_height( ) * 2.
case pnode->get_type( ).
when if_ixml_node=>co_node_element.
string = pNode->get_name( ).
write: at /indent '<', string, '> '.
when if_ixml_node=>co_node_text.
pText ?= pNode->query_interface( ixml_iid_text ).
if pText->ws_only( ) is initial.
string = pNode->get_value( ).
write: at /indent string.
endif.
endcase.
pNode = pNode->get_first_child( ).
while not pNode is initial.
perform print_node using pNode.
pNode = pNode->get_next( ).
endwhile.
endform.
but when open the XML file which i created on the desktop it shows the following error.
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
XML document must have a top level element. Error processing resource 'file:///C:/Documents and Settings/anilda/Desktop/sim...
how to rectify this error.
Regards,
satish.You are going to need to provide more details about this shell script file you are executing and the environment it is in. Beyond being on a Windows box, you have provided none of those details.
If the SQL statement will execute cleanly in SQLDeveloper but not your script, then the issue lies in the script. How do you know the error is that SQL statement? Can your script even "select * from dual;" successfully?
Also, SQLDeveloper (which I don't use) may contain its own libraries for accessing the DB. You probably should consider upgrading to a SQL*Plus client that is at least the same version or later as your database.
Note:
As I recall, xmlgen in 9.2 is now a synonym for dbms_xmlgen. You should change the package name accordingly [url http://docs.oracle.com/cd/B10501_01/appdev.920/a96612/d_xmlge2.htm#1010709]dbms_xmlgen.getXML -
i am trying to open an xml file from a URL.
i have been using the standard (i think!) xml suite, part of the System Events. is this possible? is this the best way? are there alternatives? any good tutorials of how to use it too?
the file i am trying to open is: http://www.tvrage.com/feeds/episode_list.php?sid=xxxx
where "xxxx" is a number of a show, e.g. 2930 is buffy
regards
jingo_manIt works!!
I used the URL and BufferedReader classes to fill the parser. Here's how:
// create a new object of type URL
URL xmlURL = new URL( "http://ServerName/DbName/PageName?OpenPage&username=myname&password=mypassword");
// Create the SAX2 parser
SAXParser saxParser = spf.newSAXParser();
xr = saxParser.getXMLReader();
// Set the ContentHandler
DefHandlerClass myHandler = new DefHandlerClass();
xr.setContentHandler( myHandler );
// read the URL stream into the BufferedReader
BufferedReader in = new BufferedReader( new InputStreamReader(xmlURL.openStream()));
// parse the document
xr.parse( new InputSource( in ) );
// close the input stream
in.close();
PjR -
As opening an xml file in excel?
I can not open a xml file in excel, and I get a message that is not a valid spreadsheet, and if the same file can be opened from a normal machine, anyone know how?
altairdfdfdf wrote:
I can not open a xml file in excel, and I get a message that is not a valid spreadsheet,
It's not a spreadsheet, that is why.
Open it with TextEdit. -
-Why when I open same PDF in Photoshop in opens as blank page (all the graphic info disappears)???
-And why when I'm trying to measure a page in the "image size" (in order to send to client, for example) the graphic info disappears as well??Hi Mac Attack,
My computer will not disconnect from the internet. It seems to find a clone router and continues even when I shut down and unplug my my own home iy
Your main question was 'chopped' in the title. Please reply in the body of a reply box with the full question and anything you have tried. And no, the long report was not helpful .
If the same website is opening each time you launch a browser (Safari?) hold down the shift key as you launch to prevent previous pages from opening.
Have a look at your settings in Safari > Preferences. Especially General and Privacy.
Reset Safari to remove cookies and other stored data.
System Preferences > General
Have a look at your settings in System Preferences > Security & Privacy.
Call back with more questions.
Regards,
Ian
Maybe you are looking for
-
Printing black & white slides without backgrounds to PDF?
I would like to take my Keynote presentations and export them in PDF with the text converted to black (from grey) and the backgrounds removed. I currently have a dark background graphic that I made extremely opaque so it's light and fades behind the
-
Why does siri sound different all of a sudden?
So I'm currently using a Verizon iPhone 5s and got it about 2 weeks ago. When I first used siri she had more of a fluent human like voice but now she sounds robotic, like how when the iPhone 4s came out with siri she sounded robotic.
-
How to I save the last version Of the doc I was working on?
Every time I use pages I get a new version of the document. How do I save the one I am working on so that I can identify it for adding new materail?
-
Hp 3310 all in one faxing problem
I recently changed my phone service with at&t to their u-verse. In doing so, I now realize that I am now unable to fax with my 3310 all in one, and it seems it is because it is an analog and u-verse is digital. Is there any type analog to digital i
-
New Macbook vs New Macbook Pro and Lightroom 2 Performance Increase?
I'm considering the purchase of a new Macbook or a new Macbook Pro that Apple introduced last week. I currently have an early 2007 black Macbook (2.0Ghz Intel Duo). I'm wondering if anyone has some advice and/or experience concerning how Lightroom 2