Hi,

The idea is to do away with the need to repeat a certain bolck of XML tags by putting them into a sperate file and including the same by means of a single tag .

The same XML file which is an XML instance in this case is given to the castor tool to be unmarshalled.

In case i incorporate the above in a mapping file as suggested by you.....how do i do away with hardcoding of the block of xml tags.

The input to the castor is the XML instance which i define based on the business needs.So the XML instance is not to be generated but to be provided as an input.

We have a set of class descriptor classes which take care of the unmarshalling.

Thus when i use the <include href/> the castor throws an exception saying the inlcude tag is undefined in the descriptor.

If i am not mistaken an XML instance is require for unmarshalling and not the mapping file.

Mapping file would define the underlying structure for an XML instance but still there is a need for an XML instance to be provided since i am only using the unmarshalling facility.

My query was more to probe into the possibility of the w3c having a predefined tag which allows inclusion of an external XML file.

One possibility was to define the entity in the DTD and use the same in the XML document, but this is not feasible in our environment.

Kindly suggest......if it is possible with an mapping file as u suggeted in your previous mail, please explain the details in the above context.

In short, i woud be writing an XML document and giving to castor and i want to do away with the need to hardcode the block of repeating XML tags.

Regds,

Chetan



 

>From: "Arnaud Blandin" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: [castor-dev] including external XML file in a given XMl file which is to be unmarshalled
>Date: Wed, 9 Jan 2002 14:26:27 +0100
>
>Hi Chetan,
>
>Maybe you can use the 'include' mechanism in a mapping file and define a
>mapping for your AUpart.xml document.
>
>Arnaud
>
>-----Original Message-----
>From: Chetan Rathi [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 09, 2002 11:56 AM
>To: [EMAIL PROTECTED]
>Subject: [castor-dev] including external XML file in a given XMl file
>which is to be unmarshalled
>
>Hello,
>
>I need some help regarding XML tags.
>We have certain repeating set of tags across the the XML files which are
>to be unmarshalled and am looking for a way to do away with the
>hardcoding of the same .
>The same XML file is given to the unmarshal utility of castor.
>We have a XML file AU.xml
>and certain xml block is included in AUpart.xml.
>i tried using the tag mentioned below to include the block in AU.xml
>
>
>
>It raises the follwing exception:
>
>org.xml.sax.SAXException: unable to find FieldDescriptor for 'include'
>in ClassDescriptor of ProcessDef
> at
>org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.jav
>a:713)
> at
>org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
> at
>org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVal
>idator.java:1214)
> at
>org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentSc
>anner.java:1806)
> at
>org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatc
>h(XMLDocumentScanner.java:1182)
> at
>org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScan
>ner.java:381)
> at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
> at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:335)
> at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:267)
> at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:388)
> at com.dekra.automobil.Dummy.main(dummy.java:22)
>Exception in thread "main"
>
>
>The java object model is automatically generated using castor ,using XML
>schema.
>The AU.xml is given to the unmarshaller utility.
>We are looking into the possibility of using some kind of include tag
>which allows inclusion of other external XML files.
>Kindly provide me with a solution.
>Regards,
>Chetan
>
>
> _____
>
>Chat with friends online, try MSN Messenger: Click Here
>
>----------------------------------------------------------- If you wish
>to unsubscribe from this mailing, send mail to [EMAIL PROTECTED]
>with a subject of: unsubscribe castor-dev


Chat with friends online, try MSN Messenger: Click Here
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev

Reply via email to