|
How do i create an entry for an control in xml if the name contains "< >" characters. for Ex: name="[9] <mm>somename"
|
|
|
|
|
|
Hey all,
I have been writing a tool which will allow u to convert xml files into .docx files (Word 2007). For this one needs to have the xml and a related xsl file for it.
Now i also need to convert the word document to the basic xml file that was used earlier. I couldn'nt figure out a way to do that and so have converted that word document to a basic html file. Now i am in a fix as to how to convert that file in to the original xml file.
Is the technique which i am following(Word > html > xml) correct? Or is there a better way to do this?
If there is an easier or better way to do this, Please help me out.
Thanks in Advance
Teja
|
|
|
|
|
I guess the question is if your transformation from XML to DOCX represents a lossy or lossless transformation.
If the transformation causes loss in understanding the content or structure of the original XML file, then you cannot reconstitute the exact original XML file regardless of intermediary transformations, such as to XML.
Otherwise, if your transformation is lossless, then you should have enough information to write an XSLT document that provides the inverse of the original XSLT. In this case, your intermediary step of HTML is not needed.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hey Currtis,
Thanks for the reply. Mine is a loseless transformation.
I need a clarification. What do you mean by a reverse XSLT? Once i get my reverse XSLT, Do i need to use it on the Wordml document in order to transform it into a original xml?>
Please help,
Thanks in Advance
Teja
|
|
|
|
|
Hi, Teja.
You need to craft another XSLT document that is the inverse of your original XSLT document. You have XML -> WordML, now you need a WordML -> XML transformation, as well. Then, you just run the new XSLT on the WordML document to make it XML.
Do you want to do this because you don't retain the original XML? Or, you transform it from XML so that users can edit it in Word? Then, after their edits, you want to replace it in your document management/repository system?
You're welcome, in hindsight,
Curtis.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hey Curtis,
Wow, i dint know that there existed an inverse xslt that will help me convert the WordML to a the original xml. I guess now i need to figure out as to how to write the inverse XSLT. Yes the kind of interpretation u gave about wat am i trying to do is correct. I am trying to allow a user to open an xml as word document and when he edits it and saves it, i an trying to save it in the original xml format.
Could u send me any sites in which i could get a glance of the word to xml, xslt. if i get an example, i could start writing my own xslt for the document.
Thanks for the great help,
Thanks in advance,
Teja
|
|
|
|
|
Teja,
I regret that I have to write that I know of no Web sites or books that talk about how to create an inverse XSLT. However, since you have the original one, I would recommend going through the transformation command by command, figure out the mappings XML -> WordML, and then try to capture that in another XSLT.
I don't use it myself (because it costs money and I'm cheap : ), but Altova XmlSpy can help you with understanding the transformations with its XSLT editor and debugger. I think that Altova used to allow you to download a free edition, or you could ask your company to purchase a license for the Standard, Professional, or Enterprise edition. (Note: I do not work for or with Altova.)
Hope that helps and happy hacking!
You're welcome in hindsight,
Curtis.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Curtis,
Thanks a milliom for the reply. I guess this is a path that has less flowers and more thorns in it. So let me check out your suggestion and get back to you. I guess you need to know that i am not the best of pesons in writing xslts. All i hve done is taken an xslt of another xml document and have modified it in such a way that i can help show my xml in word. What you also have to understand is that, I am trying to generate an XSLT and convert my xml to word and back programatically in .NET. So i guess i will hae to figure out a way in which i can do this .
Thank you Loads
Teja
|
|
|
|
|
Hi,
I am trying to use an xslt to Transform an XML created by serializing a WCF DataContract object to HTML and i am not able to see the values in the out put.The xml is as folows
<Assessment xmlns="http://schemas.datacontract.org/2004/07/EDIM.DataContracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Respiration>
<Accessory>true</Accessory>
<AirWaySize>3.5</AirWaySize>
<AirwayCongestion>false</AirwayCongestion>
<Apneic>true</Apneic>
<AssessmentDateTime>2009-02-20T13:22:47.313</AssessmentDateTime>
<AssessmentIdentifier>1</AssessmentIdentifier>
<Assisted>true</Assisted>
<Asymmetrical>true</Asymmetrical>
<BSUpperAirwayL i:nil="true" />
<BSUpperAirwayR i:nil="true" />
<Barking>true</Barking>
</Respiration>
</Assessment>
I am new to xslt and i created a new xslt file from VStudio 2008 and gave this xml as input and i got the error "Unspecified error File:vsee\pkgs\vssprovider\sccprj.cpp Line number:3670" eventhought i did not change anything on the new file.Shouldn't it have given me something?
I used style vision of xmlspy and when i try to view the output the Values( for eg: assisted) does not show in output.
Am i missing anything? Please help....
|
|
|
|
|
Hi,
I am beginning using XML. I can write to XML ok but I am having problems reading it in C#. What have I done wrong and how can I fix it.
My code
XmlReader Reader = new XmlTextReader(Property.Settings.Default.XML_Location);
while (Reader.Read())
{
if (Reader.Name == "Finished"));
{
listbox1.Items.Add(Reader.Name + " : " + Reader.Value);
}
}
My XML page
<testapp>
<database location="C:\Program Files\Example" filename="test.mdb" full="C:\Program Files\Example\test.mdb" />
<finish finished="True" />
<testapp>
</testapp></testapp>
Thanks
|
|
|
|
|
I don't know what your current problem is because you did not state what it was. However using == in an object oriented system is not best practice. See string.Equals()
Secondly, "Finished" is NOT EQUAL to "finished".
jammmie999 wrote: if (Reader.Name == "Finished "));
jammmie999 wrote: <finish>finished ="True" />
|
|
|
|
|
Hey guys, how's it going?
Don't know if The CodeProject is the right place for this message, but what the hell
I put this on "General Discussions" earlier but got no reply, so I figured maybe the XML forum might help...
I have this closed network and I want to put a sh*t load of content from news sites and maybe even technical sites on it so that the people using it can view it as if they were online.
I was thinking of using RSS feeds for the job. Does anyone know where I can find a simple tutorial to show me how?
Thanks a bunch,
Lior
|
|
|
|
|
This[^] looks promising.
Otherwise, there's plenty of other sites here[^].
Kristian Sixhoej
"You can always become better." - Tiger Woods
|
|
|
|
|
Thanks Kristian!
But unfortunately, I wasn't gunning for this... I don't want to create a website on the internet with the rss feed on it. I want to get the metarial into a closed intranet server. I want to be able to put all of the feed onto a CD or something and get it OUTSIDE the internet.
Do you know of something with a simple interface allowing me to do so? Or how I can look it up on google? (Can't seem to phrase it properly)
Lior
|
|
|
|
|
I haven't heard of any interface or methods for this purpose, but you could build your own application that goes through a specified RSS feed, saving all the items in it to a text file.
That's the only way I can think of to accomplish this.
Kristian Sixhoej
"You can always become better." - Tiger Woods
|
|
|
|
|
Hi Everybody.
I want to add an extra declaration statement like '<?qbxml version="7.0"?>' in my o/p xml which is generated by xslt.
Will anybody suggest me is there any way to do this using xslt?
|
|
|
|
|
I don't know if this works but you can try placing this at the top of your main xsl:template:
<xsl:processing-instruction name="qbxml">
<xsl:text>version="7.0"</xsl:text>
</xsl:processing-instruction>
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Thank You for help.
It works perferctly.
|
|
|
|
|
when I tried in xslt 1.0 in vs2008
<xsl:processing-instruction name="xml">
<xsl:text>version="1.0"</xsl:text>
</xsl:processing-instruction>
I am getting error xsl:processing-instruction cannot be a child of xsl:stylesheet
|
|
|
|
|
Hi ,
I want to retrive the xml data into my database table.
The xml file is from outside of application.so i want to retrive that xml data into database with in some temporary table
Thanq
|
|
|
|
|
If u want to do this using any programming lang. then u should check the documentation of lang. There will be some methods provided by its api to extract xml elements.
|
|
|
|
|
Hi all!
I want to add an extra header in my output xml which is generated by converting simple xml.
how can i add header in o/p xml?
plz suggest me.
|
|
|
|
|
jagjit_surfer wrote: how can i add header in o/p xml?
Well you could use XSLT for that. There are other ways.
|
|
|
|
|
I m currently using xslt, but i don't know the way how can i set xml declaration?
I want to add extra declaration like in my transformed xml doc.
Would u plz suggest me?
modified on Friday, February 20, 2009 1:55 AM
|
|
|
|