Howto disable doctype autodetection?

L

Lau Lei Cheong

Hello,

I'm attempting to use MS Word 2003 to translate one file in xml-like
format to another language. (Actually, I'm using it to translate a
Tranditional Chinese resx file into Simplified Chinese, if that'll help you
understand the problem I'm facing) No matter I rename the file to xml or
txt, Word automatically recognize it as xml file and keep replacing "type"
value to illegal "xsd:string" for me. So when I finish translation and open
it with VS.NET, the IDE keep telling me there is illegal type value in the
file and refusing to open it.

Is there a way to tell MS Word stop playing with it and just treat it as
plain text file?

Regards,
Lau Lei Cheong
 
B

Bob Buckland ?:-\)

Hi Lau Lei Cheong,

You may want to also post this in the Office XML newsgroup,
of the Office Developer's group (links below),
and perhaps explain your definition of 'xml-like'
in a bit more detail.

If you're saying that it's not a Word produced file
then you may want to use the [x] Confirm conversions at
Open setting in Tools=>Options=>General and select 'text'
as the file type.

=========
Hello,

I'm attempting to use MS Word 2003 to translate one file in xml-like
format to another language. (Actually, I'm using it to translate a
Tranditional Chinese resx file into Simplified Chinese, if that'll help you
understand the problem I'm facing) No matter I rename the file to xml or
txt, Word automatically recognize it as xml file and keep replacing "type"
value to illegal "xsd:string" for me. So when I finish translation and open
it with VS.NET, the IDE keep telling me there is illegal type value in the
file and refusing to open it.

Is there a way to tell MS Word stop playing with it and just treat it as
plain text file?

Regards,
Lau Lei Cheong>>
--
LLet us know if this has helped you,

Bob Buckland ?:)
MS Office System Products MVP
*courtesy is not expensive and can pay big dividends8

A. Specific newsgroup/discussion group mentioned in this message:
news://msnews.microsoft.com/microsoft.public.office.xml
news://msnews.microsoft.com/microsoft.public.officedev
or via browser:
http://microsoft.com/communities/newsgroups/en-us/?dg=microsoft.public.office.xml

http://microsoft.com/communities/newsgroups/en-us/?dg=microsoft.public.officedev

B. MS Office Community discussion/newsgroups via Web Browser
http://microsoft.com/office/community/en-us/default.mspx
or
Microsoft hosted newsgroups via Outlook Express/newsreader
news://msnews.microsoft.com
 
L

Lau Lei Cheong

Hello,

Yeah! That works. :) Thanks Bob.

For the XML formats, I see the difference is mainly on the schema part.
Here's the upper part of a valid resx file:

<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"
msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0"
msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"
msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>

And then the converted one that does not work:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<root>
<schema id="root" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="root" NS2:IsDataSet="true"
xmlns:NS2="urn:schemas-microsoft-com:xml-msdata">
<complexType>
<choice maxOccurs="unbounded">
<element name="data">
<complexType>
<sequence>
<element name="value" type="xsd:string" minOccurs="0"
NS2:Ordinal="1"></element>
<element name="comment" type="xsd:string" minOccurs="0"
NS2:Ordinal="2"></element>
</sequence>
<attribute name="name" type="xsd:string"></attribute>
<attribute name="type" type="xsd:string"></attribute>
<attribute name="mimetype" type="xsd:string"></attribute>
</complexType>
</element>
<element name="resheader">
<complexType>
<sequence>
<element name="value" type="xsd:string" minOccurs="0"
NS2:Ordinal="1"></element>
</sequence>
<attribute name="name" type="xsd:string" use="required"></attribute>
</complexType>
</element>
</choice>
</complexType>
</element>
</schema>

You see, the tags have changed name. Some properties are added and some are
removed. The converted one is perfectly valid XML file, however it's not in
RESX format any more, the VS.NET IDE don't recognize it and refuse to parse
it.

It's no longer a problem for me now, but I've included it for your
reference.

Regards,
Lau Lei Cheong

Bob Buckland ?:-) said:
Hi Lau Lei Cheong,

You may want to also post this in the Office XML newsgroup,
of the Office Developer's group (links below),
and perhaps explain your definition of 'xml-like'
in a bit more detail.

If you're saying that it's not a Word produced file
then you may want to use the [x] Confirm conversions at
Open setting in Tools=>Options=>General and select 'text'
as the file type.

=========
Hello,

I'm attempting to use MS Word 2003 to translate one file in xml-like
format to another language. (Actually, I'm using it to translate a
Tranditional Chinese resx file into Simplified Chinese, if that'll help
you
understand the problem I'm facing) No matter I rename the file to xml or
txt, Word automatically recognize it as xml file and keep replacing "type"
value to illegal "xsd:string" for me. So when I finish translation and
open
it with VS.NET, the IDE keep telling me there is illegal type value in the
file and refusing to open it.

Is there a way to tell MS Word stop playing with it and just treat it
as
plain text file?

Regards,
Lau Lei Cheong>>
--
LLet us know if this has helped you,

Bob Buckland ?:)
MS Office System Products MVP
*courtesy is not expensive and can pay big dividends8

A. Specific newsgroup/discussion group mentioned in this message:
news://msnews.microsoft.com/microsoft.public.office.xml
news://msnews.microsoft.com/microsoft.public.officedev
or via browser:

http://microsoft.com/communities/newsgroups/en-us/?dg=microsoft.public.office.xml


http://microsoft.com/communities/newsgroups/en-us/?dg=microsoft.public.officedev

B. MS Office Community discussion/newsgroups via Web Browser
http://microsoft.com/office/community/en-us/default.mspx
or
Microsoft hosted newsgroups via Outlook Express/newsreader
news://msnews.microsoft.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top