Google Groups Home
Help | Sign in
DOCTYPE and XML declaration
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jo Knowles  
View profile  
 More options Sep 20 2001, 4:34 am
Newsgroups: microsoft.public.biztalk.server
From: "Jo Knowles" <jo.know...@eds.com>
Date: Thu, 20 Sep 2001 01:30:51 -0700
Local: Thurs, Sep 20 2001 4:30 am
Subject: DOCTYPE and XML declaration
Does anyone know how do I get BizTalk to output a DOCTYPE
declaration

<!DOCTYPE ... ...>

and an XML declaration

<? xml version="1.0">

when producing XML from a flatfile?

thanks in andvance

Jo


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marcel  
View profile  
 More options Sep 26 2001, 6:19 pm
Newsgroups: microsoft.public.biztalk.server
From: "Marcel" <marcel.e.savi...@nz.andersen.com>
Date: Wed, 26 Sep 2001 14:57:10 -0700
Local: Wed, Sep 26 2001 5:57 pm
Subject: DOCTYPE and XML declaration
This is crazy thing about BizTalk. There is no way to tell
BizTalk to generate the xml or DocType definitions through
any user interface (that I know of). There's even less in
the way of documention. The key is to use a BizTalk map
because the maps are basically just XSL transformations.

Create a map in the BizTalk mapper, and then open the map
file with a text editor and find the XSL portion. It
should look a bit like this:

<CompiledXSL><xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:var="urn:var" xmlns:user="urn:user" exclude-result-
prefixes="msxsl var user" version="1.0">
                        <xsl:output method="xml" omit-xml-
declaration="yes"/>

...
...

There-in lies the solution. The <xsl:output> tag has a
number of property, one of which is "omit-xml-declaration"
which you set to "no" to generate a <?xml version="1.0"?>
definition. The doctype can also be generated via the same
tag by using the doctype-public or doctype-system
properties. Here's an example:

<xsl:output method="xml" omit-xml-declaration="no" doctype-
system="http:/mysite.com/dtds/myxml.dtd"/>

This should generate the following:

<?xml version="1.0"?>
<!DOCTYPE PurchaseOrder
SYSTEM "http:/mysite.com/dtds/myxml.dtd">
...
...

Things to remember are that once you have edited the map
file with the text editor, if you open the file and save
it with the Biztalk mapper, you will loose your changes.
Also, when BizTalk generates the output file, it will try
to find the DTD file using the path above. If it can't
find the file or it does not understand the file address,
BizTalk will fail with the following error:

An error occurred in BizTalk Server.

Details:
------------------------------
The XML document could not be translated. The map
specified by reference "<PATH TO BIZTALK MAP>" failed.
Verify that the map is up to date.

The following channel configuration setting is not
valid: "<CHANNEL NAME>"

The server could not finish processing the document.

Hope that helps.. Took me almost a whole day to figure
this out through trial and error... though mostly error.

Marcel.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jo Knowles  
View profile  
 More options Sep 28 2001, 3:17 am
Newsgroups: microsoft.public.biztalk.server
From: "Jo Knowles" <jo.know...@eds.com>
Date: Fri, 28 Sep 2001 00:14:30 -0700
Local: Fri, Sep 28 2001 3:14 am
Subject: DOCTYPE and XML declaration
Marcel

Thanks for the reply.  I'll give it a go

cheers

Jo


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google