skip same line with Saxon
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 2
- Joined: Thu Jul 21, 2005 3:41 pm
skip same line with Saxon
I need to skip the first line of my XML because when saxon reed that line don't work well. the line that i need to skip is:
<!DOCTYPE WebML SYSTEM "MyDtd.dtd">
I'd like to know if there is same command that i can use from the command line to say saxon that when there is that line, will be jumped to the next one
Thanks
Marco
<!DOCTYPE WebML SYSTEM "MyDtd.dtd">
I'd like to know if there is same command that i can use from the command line to say saxon that when there is that line, will be jumped to the next one
Thanks
Marco
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
There is no such command, any conformat XML processor that will read the XML file will try to look into that DTD. Possible solutions depend on what your problem is exactly. If you have the DTD but it is a different location then the solution is to set an entity resolver. If you really want that removed then you have to preprocess the file and remove that before feading it into the transformation.
Best Regards,
George
There is no such command, any conformat XML processor that will read the XML file will try to look into that DTD. Possible solutions depend on what your problem is exactly. If you have the DTD but it is a different location then the solution is to set an entity resolver. If you really want that removed then you have to preprocess the file and remove that before feading it into the transformation.
Best Regards,
George
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Hi,
You could make an empty file called "MyDtd.dtd" and place it in the same directory with your xml file. The processor only checks if the dtd file is valid and does not try to validate the xml file in accordance to the dtd file so the transformation will succeed.
If this is not acceptable you can apply a regular expression search on the XML document with the expression "<!DOCTYPE(.*?)SYSTEM\s"(.*?)">" and replace it with the empty string or just make an application that deletes the first line from a file if you are sure the doctype will always be on the first line.
Hope this helps.
Regards, Radu.
You could make an empty file called "MyDtd.dtd" and place it in the same directory with your xml file. The processor only checks if the dtd file is valid and does not try to validate the xml file in accordance to the dtd file so the transformation will succeed.
If this is not acceptable you can apply a regular expression search on the XML document with the expression "<!DOCTYPE(.*?)SYSTEM\s"(.*?)">" and replace it with the empty string or just make an application that deletes the first line from a file if you are sure the doctype will always be on the first line.
Hope this helps.
Regards, Radu.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service